summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Unbound/src/android/dns')
-rw-r--r--3rdParty/Unbound/src/android/dns/dns_android.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/3rdParty/Unbound/src/android/dns/dns_android.cpp b/3rdParty/Unbound/src/android/dns/dns_android.cpp
index 4b1c368..d7cfa15 100644
--- a/3rdParty/Unbound/src/android/dns/dns_android.cpp
+++ b/3rdParty/Unbound/src/android/dns/dns_android.cpp
@@ -18,6 +18,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* /*aReserved*/) {
std::vector<std::string> get_servers() {
std::vector<std::string> servers;
+ if (javaVM == 0) {
+ return servers;
+ }
JNIEnv* env = 0;
int result = javaVM->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);