From d486d5def9a98f439f374c81a7b5795b3508c19d Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 9 Aug 2014 11:37:05 +0200 Subject: trying to fix activity has been destroyed error --- src/eu/siacs/conversations/ui/ConversationActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/eu') diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index d7708b52..80369bbf 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -607,12 +607,15 @@ public class ConversationActivity extends XmppActivity { protected ConversationFragment swapConversationFragment() { ConversationFragment selectedFragment = new ConversationFragment(); + if (!isFinishing()) { FragmentTransaction transaction = getFragmentManager() .beginTransaction(); transaction.replace(R.id.selected_conversation, selectedFragment, "conversation"); - transaction.commitAllowingStateLoss(); + + transaction.commitAllowingStateLoss(); + } return selectedFragment; } -- cgit v1.2.3