Commit 11314179 authored by Sébastien Toque's avatar Sébastien Toque
Browse files

fix crash if MainActivity's instance doesn't exists

parent e40a70ec
......@@ -55,7 +55,7 @@ public class LibVLC {
sInstance = new LibVLC();
if (sListener == null) {
if (sListener == null && MainActivity.getInstance() != null) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.getInstance());
/* This needs to be stored in a local field, to avoid garbage collection, since
* the shared prefs only keep a weak reference to it. */
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