Commit c812e8ca authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent NPE

parent d6522aae
......@@ -3042,10 +3042,11 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mHandler.post(new Runnable() {
@Override
public void run() {
for(String file : mSubtitleSelectedFiles) {
Log.i(TAG, "Adding user-selected subtitle " + file);
mService.addSubtitleTrack(file, true);
}
if (mService != null)
for(String file : mSubtitleSelectedFiles) {
Log.i(TAG, "Adding user-selected subtitle " + file);
mService.addSubtitleTrack(file, true);
}
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment