[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - android/source

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 14 11:30:24 UTC 2021


 android/source/src/java/org/libreoffice/ui/FileUtilities.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2fc22184a36572dd5d571fab29340ab517656436
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Jun 11 13:55:43 2021 +0200
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Jun 14 13:29:52 2021 +0200

    tdf#142618 android: Don't crash when passed MIME type is null
    
    Change-Id: I5fb532b36fe650596f25a1ba8b7dc56e21292dc1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117053
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 6bfa94398a0ea501fce7634ab0ae9ce35c442043)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117116

diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
index 4c9c0d6d10eb..5bfb93b4c1f5 100644
--- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
@@ -121,7 +121,7 @@ public class FileUtilities {
      */
     public static boolean isTemplateMimeType(final String mimeType) {
         // this works for ODF and OOXML template MIME types
-        return mimeType.endsWith("template");
+        return mimeType != null && mimeType.endsWith("template");
     }
 
     /**


More information about the Libreoffice-commits mailing list