diff options
author | Artur Dryomov <artur.dryomov@gmail.com> | 2013-10-25 15:29:57 +0300 |
---|---|---|
committer | Artur Dryomov <artur.dryomov@gmail.com> | 2013-10-25 15:39:40 +0300 |
commit | 53481041066e39d1309827fc7902228626c3a4c7 (patch) | |
tree | 935d44ec5cc7d948b1c780ea848367f4c41c6823 /android | |
parent | 16c53fb6aa50a8e433bced25d1361a6bcaeb51a8 (diff) |
Fix possible NPE.
Change-Id: Ifca1e64aacf0f4b4e83f70c9bcbe6bb79f5415fd
Diffstat (limited to 'android')
3 files changed, 12 insertions, 0 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java index 1dbc22f4f17a..4d00217a703c 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java @@ -151,6 +151,10 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi } private void startSlideShow() { + if (!isServiceBound()) { + return; + } + if (mCommunicationService.getSlideShow().isRunning()) { setUpSlideShowInformation(); return; diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java index 19657cd0f09b..ea8c702f8028 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java @@ -459,6 +459,10 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo } private void stopComputersSearch() { + if (!isServiceBound()) { + return; + } + mCommunicationService.stopServersSearch(); } diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java index 46929770987c..a51b4162fc54 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java @@ -119,6 +119,10 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn } private void setUpCurrentSlide() { + if (!isServiceBound()) { + return; + } + SlideShow aSlideShow = mCommunicationService.getSlideShow(); getSlidesPager().setCurrentItem(aSlideShow.getCurrentSlideIndex()); |