mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 21:15:30 +03:00
avoid NPE in CallActivity#onDestroy
Exception java.lang.RuntimeException: at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:6032) at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:6077) at android.app.servertransaction.DestroyActivityItem.execute (DestroyActivityItem.java:47) at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2443) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loopOnce (Looper.java:226) at android.os.Looper.loop (Looper.java:313) at android.app.ActivityThread.main (ActivityThread.java:8751) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135) Caused by java.lang.NullPointerException: at com.nextcloud.talk.activities.CallActivity.onDestroy (CallActivity.java:1244) at android.app.Activity.performDestroy (Activity.java:8571) at android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1364) at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:6019) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
bbcf485dbc
commit
dcc323f0a8
1 changed files with 3 additions and 1 deletions
|
@ -1318,7 +1318,9 @@ public class CallActivity extends CallBaseActivity {
|
|||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
signalingMessageReceiver.removeListener(offerMessageListener);
|
||||
if (signalingMessageReceiver != null) {
|
||||
signalingMessageReceiver.removeListener(offerMessageListener);
|
||||
}
|
||||
|
||||
if (localStream != null) {
|
||||
localStream.dispose();
|
||||
|
|
Loading…
Reference in a new issue