summaryrefslogtreecommitdiff
path: root/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
index a74fb2eeed77..0b292372d48c 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
@@ -54,7 +54,12 @@ public class SlideShow {
return BitmapFactory.decodeResource(mContext.getResources(),
R.drawable.image_loading);
}
- return BitmapFactory.decodeByteArray(aImage, 0, aImage.length);
+ Bitmap aBitmap = BitmapFactory.decodeByteArray(aImage, 0, aImage.length);
+ if (aBitmap == null) {
+ return BitmapFactory.decodeResource(mContext.getResources(),
+ R.drawable.image_loading);
+ }
+ return aBitmap;
}
protected void putNotes(int aSlide, String aNotes) {
@@ -178,4 +183,4 @@ public class SlideShow {
}
}
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */