[Libreoffice-commits] core.git: android/experimental
Michael Meeks
michael.meeks at collabora.com
Fri Feb 20 03:39:08 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 6cdd02a7fd582af7b10c8ffc4d88589e77d1228d
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Feb 20 11:42:25 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 9307851..fd4d7b2 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
@@ -62,7 +62,7 @@ public class GridItemAdapter extends BaseAdapter {
}
public int getCount() {
- return filePaths.size();
+ return filePaths != null ? filePaths.size() : 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 9435c092..e12141b 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -602,7 +602,7 @@ public class LibreOfficeUIActivity extends LOAbout implements ActionBar.OnNaviga
}
public int getCount() {
- return filePaths.size();
+ return filePaths != null ? filePaths.size() : 0;
}
public Object getItem(int arg0) {
More information about the Libreoffice-commits
mailing list