From: David A. Velasco Date: Thu, 7 Mar 2013 09:42:50 +0000 (+0100) Subject: Fixed CRASH due to ArrayIndexOutOfBoundsException while choosing the icon for a file... X-Git-Tag: oc-android-1.4.3~40^2~12 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/4b46b17fcb395ae41a2796ffa2de5db3001c4a5c Fixed CRASH due to ArrayIndexOutOfBoundsException while choosing the icon for a file with a wrong MIME type (reported in Play Store) --- diff --git a/src/com/owncloud/android/DisplayUtils.java b/src/com/owncloud/android/DisplayUtils.java index 12b615e4..0e1b2b64 100644 --- a/src/com/owncloud/android/DisplayUtils.java +++ b/src/com/owncloud/android/DisplayUtils.java @@ -145,7 +145,7 @@ public class DisplayUtils { } else { String [] parts = mimetype.split("/"); String type = parts[0]; - String subtype = parts[1]; + String subtype = (parts.length > 0) ? parts[1] : ""; if(TYPE_TXT.equals(type)) { return R.drawable.file_doc;