Skip to content
Snippets Groups Projects
Commit 4a66ec28 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Prevent NPE on media deletion

parent 47794006
No related branches found
No related tags found
No related merge requests found
......@@ -189,11 +189,12 @@ public abstract class MediaBrowserFragment extends PlaybackServiceFragment imple
for (String folder : foldersToReload)
mMediaLibrary.reload(folder);
if (mService != null && getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
VLCApplication.runOnMainThread(new Runnable() {
@Override
public void run() {
for (String path : mediaPaths)
mService.removeLocation(path);
if (mService != null)
for (String path : mediaPaths)
mService.removeLocation(path);
if (refresh)
onRefresh();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment