mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 01:39:20 +00:00
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...
This commit is contained in:
parent
a2bf48f6b5
commit
a26324b95f
1 changed files with 3 additions and 0 deletions
|
|
@ -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}}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue