Commit c27049a0 authored by jehan's avatar jehan
Browse files

fix npe in case of null route in proxy config java

parent 176616e0
......@@ -496,10 +496,14 @@ extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getProxy(JNIEn
}
}
extern "C" int Java_org_linphone_core_LinphoneProxyConfigImpl_setRoute(JNIEnv* env,jobject thiz,jlong proxyCfg,jstring jroute) {
if (jroute != NULL) {
const char* route = env->GetStringUTFChars(jroute, NULL);
int err=linphone_proxy_config_set_route((LinphoneProxyConfig*)proxyCfg,route);
env->ReleaseStringUTFChars(jroute, route);
return err;
} else {
return linphone_proxy_config_set_route((LinphoneProxyConfig*)proxyCfg,NULL);
}
}
extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getRoute(JNIEnv* env,jobject thiz,jlong proxyCfg) {
const char* route = linphone_proxy_config_get_route((LinphoneProxyConfig*)proxyCfg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment