From e4f3a96709052731cc75de19cf7cab94d892bcea Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 6 Aug 2023 21:53:13 +0800 Subject: [PATCH] Update Android port * java/org/gnu/emacs/EmacsService.java (readDirectoryEntry): Fix potential NULL dereference. --- java/org/gnu/emacs/EmacsService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index 036bc9cf098..d91d8f66009 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java @@ -1522,7 +1522,8 @@ public final class EmacsService extends Service return entry; } - if (type.equals (Document.MIME_TYPE_DIR)) + if (type != null + && type.equals (Document.MIME_TYPE_DIR)) entry.d_type = 1; entry.d_name = name; return entry; -- 2.39.2