summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2017-03-29 13:28:06 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2017-03-29 13:28:06 -0700
commit1c5fdb8a0a20654cdec57347647034357e0f92a4 (patch)
tree0f8f91d8ccf0f2fae97bb4c6e328313c00dc54aa
parentde4b9e9a16eecab6b731c7b51cb2d08e112a3044 (diff)
downloadinfinitytier-1c5fdb8a0a20654cdec57347647034357e0f92a4.tar.gz
infinitytier-1c5fdb8a0a20654cdec57347647034357e0f92a4.zip
fix path checker initialization
-rw-r--r--java/jni/com_zerotierone_sdk_Node.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/jni/com_zerotierone_sdk_Node.cpp b/java/jni/com_zerotierone_sdk_Node.cpp
index 307add39..ac0453ba 100644
--- a/java/jni/com_zerotierone_sdk_Node.cpp
+++ b/java/jni/com_zerotierone_sdk_Node.cpp
@@ -785,15 +785,15 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_node_1init(
cls, "pathChecker", "Lcom/zerotier/sdk/PathChecker;");
if(fid == NULL)
{
+ LOGE("no path checker?");
return NULL;
}
tmp = env->GetObjectField(obj, fid);
- if(tmp == NULL)
+ if(tmp != NULL)
{
- return NULL;
+ ref->pathChecker = env->NewGlobalRef(tmp);
}
- ref->pathChecker = env->NewGlobalRef(tmp);
ref->callbacks->dataStoreGetFunction = &DataStoreGetFunction;
ref->callbacks->dataStorePutFunction = &DataStorePutFunction;