From 514d6d4dd59d6ba2d6725578c1c59d840a085952 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 30 Jun 2017 09:46:56 +0200 Subject: [PATCH] fix crash in instantiating fragment --- .../java/info/nightscout/androidaps/tabs/TabPageAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java b/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java index b6eaf73ce4..8dff2aec93 100644 --- a/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java +++ b/app/src/main/java/info/nightscout/androidaps/tabs/TabPageAdapter.java @@ -59,7 +59,7 @@ public class TabPageAdapter extends FragmentStatePagerAdapter { } public void registerNewFragment(PluginBase plugin) { - if (plugin.isVisibleInTabs(plugin.getType())) { + if (plugin.hasFragment() && plugin.isVisibleInTabs(plugin.getType())) { visibleFragmentList.add(plugin); notifyDataSetChanged(); }