aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index c073341f7..825494d90 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -1130,10 +1130,14 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
@NonNull
@Override
public Fragment instantiateItem(@NonNull ViewGroup container, int position) {
- Fragment fragment = getItem(position);
- FragmentTransaction trans = fragmentManager.beginTransaction();
+ final Fragment fragment = getItem(position);
+ final FragmentTransaction trans = fragmentManager.beginTransaction();
trans.add(container.getId(), fragment, "fragment:" + position);
- trans.commit();
+ try {
+ trans.commit();
+ } catch (IllegalStateException e) {
+ //ignore
+ }
return fragment;
}