Browse Source

Safety net for onDestroy

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 years ago
parent
commit
350f7cc579

+ 3 - 1
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

@@ -1124,7 +1124,9 @@ public class CallActivity extends AppCompatActivity {
 
 
     @Override
     @Override
     public void onDestroy() {
     public void onDestroy() {
-        hangup(false);
+        if (inCall) {
+            hangup(false);
+        }
         //this.unregisterReceiver(networkBroadcastReceier);
         //this.unregisterReceiver(networkBroadcastReceier);
         super.onDestroy();
         super.onDestroy();
     }
     }