diff options
author | Chris Robinson <[email protected]> | 2017-02-05 14:25:17 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-02-05 14:25:17 -0800 |
commit | af362c2d05097fce816b5c5d911d6650eb6bef37 (patch) | |
tree | ef1135e0520993248d05c7b0157e8899ac5a3c66 /Alc/ALc.c | |
parent | 428cde5dc26191871111e1edbea85ade952898aa (diff) |
Fix for NULL JNIEnv
Which can happen with native-only apps
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1179,6 +1179,12 @@ static void CleanupJNIEnv(void* UNUSED(ptr)) void *Android_GetJNIEnv(void) { + if(!gJavaVM) + { + WARN("gJavaVM is NULL!\n"); + return NULL; + } + /* http://developer.android.com/guide/practices/jni.html * * All threads are Linux threads, scheduled by the kernel. They're usually |