aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-03-31 14:01:52 +0200
committerChristian Schneppe <christian@pix-art.de>2019-03-31 14:01:52 +0200
commit0f1ed6f7e0e7aca479f6d780795a5087532e7753 (patch)
tree0f80c3425409154b1dd290583998995ed97189ce /src/main
parent4a9fa103744e7a87be3a4e8085680eb790e935e7 (diff)
try to fix a crash during fragment detection
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 245794c59..02785cb40 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1120,7 +1120,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
menuInviteContact.setVisible(false);
menuArchiveChat.setTitle(R.string.action_end_conversation);
}
- if (getFragmentManager().findFragmentById(R.id.secondary_fragment) != null) {
+ Fragment secondaryFragment = getFragmentManager().findFragmentById(R.id.secondary_fragment);
+ if (secondaryFragment != null && secondaryFragment instanceof ConversationFragment) {
if (conversation.getMode() == Conversation.MODE_MULTI) {
menuGroupDetails.setTitle(conversation.getMucOptions().isPrivateAndNonAnonymous() ? R.string.action_group_details : R.string.channel_details);
menuGroupDetails.setVisible(true);