summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorArtur Dryomov <artur.dryomov@gmail.com>2013-09-15 00:43:16 +0300
committerArtur Dryomov <artur.dryomov@gmail.com>2013-09-15 02:34:29 +0300
commit10ca4e0b79725729bf866aba6ba99fd5cbee859e (patch)
treed460290ca013dc5cfdb0fd2090f59a1218e771bc /android
parent57e171b3933b8afca1ae4cdd63b87486f18161ba (diff)
Fix possible NPE.
Well, try to fix them. Change-Id: I8f774d35a304367bbdd1778628a1224031355ed4
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java8
1 files changed, 8 insertions, 0 deletions
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;
}