Prevent crash when trying to access Lc from Manager
This commit is contained in:
parent
e7ffe4ab0b
commit
6551e39421
1 changed files with 2 additions and 2 deletions
|
@ -1230,10 +1230,10 @@ public class LinphoneManager implements LinphoneCoreListener {
|
|||
|
||||
|
||||
public static synchronized LinphoneCore getLcIfManagerNotDestroyedOrNull() {
|
||||
if (sExited) {
|
||||
if (sExited || instance == null) {
|
||||
// Can occur if the UI thread play a posted event but in the meantime the LinphoneManager was destroyed
|
||||
// Ex: stop call and quickly terminate application.
|
||||
Log.w("Trying to get linphone core while LinphoneManager already destroyed");
|
||||
Log.w("Trying to get linphone core while LinphoneManager already destroyed or not created");
|
||||
return null;
|
||||
}
|
||||
return getLc();
|
||||
|
|
Loading…
Reference in a new issue