Commit 2538b5cb authored by David Carre's avatar David Carre Committed by Ludovic Fauvet
Browse files

Prevent a crash if the eventManager is not attached

Signed-off-by: default avatarLudovic Fauvet <>
parent e6329e3c
......@@ -55,7 +55,7 @@ jboolean releaseMediaPlayer(JNIEnv *env, jobject thiz)
JavaVM *myVm;
static jobject eventManagerInstance;
static jobject eventManagerInstance = NULL;
static pthread_mutex_t vout_android_lock;
static void *vout_android_surf = NULL;
......@@ -106,6 +106,9 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data)
int isAttached = 0;
if (eventManagerInstance == NULL)
status = (*myVm)->GetEnv(myVm, (void**) &env, JNI_VERSION_1_2);
if (status < 0) {
LOGD("vlc_event_callback: failed to get JNI environment, "
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