From 10ca4e0b79725729bf866aba6ba99fd5cbee859e Mon Sep 17 00:00:00 2001 From: Artur Dryomov Date: Sun, 15 Sep 2013 00:43:16 +0300 Subject: Fix possible NPE. Well, try to fix them. Change-Id: I8f774d35a304367bbdd1778628a1224031355ed4 --- .../org/libreoffice/impressremote/fragment/ComputersFragment.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'android/sdremote') diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java index 81e6ed91a281..5527ea4d61c4 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java @@ -167,6 +167,10 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo } private void loadComputers() { + if (!isVisible()) { + return; + } + if (getComputers().isEmpty()) { hideComputersList(); setUpProgressMessage(); @@ -225,6 +229,10 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo @Override public void run() { + if (!isVisible()) { + return; + } + if (!isShowingProgressMessageRequired()) { return; } -- cgit