Commit a26324b9 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Workaround Android crash due to Java's object nativePtr set to 0 in finalize()...

Workaround Android crash due to Java's object nativePtr set to 0 in finalize() and yet some methods of this objects are still used after...
parent a2bf48f6
......@@ -428,6 +428,9 @@ jobject Java_{{jni_package}}FactoryImpl_createCore(JNIEnv *env, jobject thiz, jo
{{return}} {{name}}({{params}}) {
{{#notStatic}}{{classCName}} *cptr = ({{classCName}}*)ptr;
{{#isLinphoneFactory}}cptr = linphone_factory_get();{{/isLinphoneFactory}}
if (cptr == 0) {
return {{#hasReturn}}0{{/hasReturn}}{{#hasStringReturn}}0{{/hasStringReturn}}{{#hasListReturn}}0{{/hasListReturn}}{{#hasByteArrayReturn}}0{{/hasByteArrayReturn}};
}
{{/notStatic}}{{#strings}}
const char* c_{{string}} = GetStringUTFChars(env, {{string}});
{{/strings}}{{#bytes}}
......
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