[Libreoffice-commits] core.git: Branch 'distro/collabora/viewer' - android/experimental
Michael Meeks
michael.meeks at collabora.com
Fri Feb 20 04:30:39 PST 2015
android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java | 2 +-
android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 039ad4b49c3d6e8b7a6c613c902d483214500c50
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Feb 20 11:03:26 2015 +0000
android: protect against a crash with an empty sdcard.
If you mis-configure your emulator - that's what you get.
Unfortunate that this affects 2x places.
Change-Id: I0b281d96b22ec3ac793c687ee7f3ba1a78784ace
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
index 13e8732..47fa245 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
@@ -59,7 +59,7 @@ public class GridItemAdapter extends BaseAdapter {
}
public int getCount() {
- return filePaths.length;
+ return filePaths != null ? filePaths.length : 0;
}
public Object getItem(int position) {
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 3e154e0..494c02b 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -430,7 +430,7 @@ public class LibreOfficeUIActivity extends LOAbout implements ActionBar.OnNaviga
public int getCount() {
// TODO Auto-generated method stub
- return filePaths.length;
+ return filePaths != null ? filePaths.length : 0;
}
public Object getItem(int arg0) {
More information about the Libreoffice-commits
mailing list