From 7930c97deeca3010cf0df0c0a53b149d27e17026 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Thu, 24 Jan 2019 12:12:48 +0100 Subject: [PATCH] Fix a crash with older Nc versions Signed-off-by: Mario Danic --- .../nextcloud/talk/controllers/ContactsController.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java index e0f6f766f..8e8366b2b 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java @@ -291,7 +291,14 @@ public class ContactsController extends BaseController implements SearchView.OnQ } else { conversationIntent.putExtras(bundle); startActivity(conversationIntent); - new Handler().postDelayed(() -> getRouter().popCurrentController(), 100); + new Handler().postDelayed(new Runnable() { + @Override + public void run() { + if (!isDestroyed() && !isBeingDestroyed()) { + getRouter().popCurrentController(); + } + } + }, 100); } }