[sword-svn] r3235 - trunk/bindings/java-jni/jni
scribe at crosswire.org
scribe at crosswire.org
Wed May 14 23:12:34 MST 2014
Author: scribe
Date: 2014-05-14 23:12:34 -0700 (Wed, 14 May 2014)
New Revision: 3235
Modified:
trunk/bindings/java-jni/jni/swordstub.cpp
Log:
updated to work with null search scope
Modified: trunk/bindings/java-jni/jni/swordstub.cpp
===================================================================
--- trunk/bindings/java-jni/jni/swordstub.cpp 2014-05-15 02:45:53 UTC (rev 3234)
+++ trunk/bindings/java-jni/jni/swordstub.cpp 2014-05-15 06:12:34 UTC (rev 3235)
@@ -1230,7 +1230,7 @@
const int MAX_RETURN_COUNT = 999999;
const char *expression = env->GetStringUTFChars(expressionJS, NULL);
- const char *scope = env->GetStringUTFChars(scopeJS, NULL);
+ const char *scope = scopeJS ? env->GetStringUTFChars(scopeJS, NULL) : 0;
jclass clazzSearchHit = env->FindClass("org/crosswire/android/sword/SWModule$SearchHit");
jobjectArray ret = 0;
@@ -1292,7 +1292,7 @@
env->DeleteLocalRef(modName);
}
- env->ReleaseStringUTFChars(scopeJS, scope);
+ if (scope) env->ReleaseStringUTFChars(scopeJS, scope);
env->ReleaseStringUTFChars(expressionJS, expression);
return (ret) ? ret : (jobjectArray) env->NewObjectArray(0, clazzSearchHit, NULL);
More information about the sword-cvs
mailing list