diff options
author | Grant Limberg <grant.limberg@zerotier.com> | 2017-03-29 13:28:06 -0700 |
---|---|---|
committer | Grant Limberg <grant.limberg@zerotier.com> | 2017-03-29 13:28:06 -0700 |
commit | 1c5fdb8a0a20654cdec57347647034357e0f92a4 (patch) | |
tree | 0f8f91d8ccf0f2fae97bb4c6e328313c00dc54aa | |
parent | de4b9e9a16eecab6b731c7b51cb2d08e112a3044 (diff) | |
download | infinitytier-1c5fdb8a0a20654cdec57347647034357e0f92a4.tar.gz infinitytier-1c5fdb8a0a20654cdec57347647034357e0f92a4.zip |
fix path checker initialization
-rw-r--r-- | java/jni/com_zerotierone_sdk_Node.cpp | 6 |
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; |