From 7500c58e1c5da0a35dec0c480f1e8603c5c5c563 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 28 Feb 2026 16:54:02 +0530 Subject: [PATCH] Fix #9569 --- glfw/x11_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/x11_window.c b/glfw/x11_window.c index 5d52d5e91..ec05354be 100644 --- a/glfw/x11_window.c +++ b/glfw/x11_window.c @@ -1529,7 +1529,7 @@ update_drop_state(_GLFWwindow* window, size_t mime_count) { // The first MIME in the sorted list is the preferred one for drop const char* new_preferred_mime = (accepted && mime_count > 0) ? dnd.mimes[0] : NULL; // Check if the preferred MIME changed - bool mime_changed = (new_preferred_mime == NULL && dnd.format[0] != 0) || strncmp(new_preferred_mime, dnd.format, arraysz(dnd.format)) != 0; + bool mime_changed = strncmp(new_preferred_mime ? new_preferred_mime : "", dnd.format, arraysz(dnd.format)) != 0; if (mime_changed) { if (new_preferred_mime) strncpy(dnd.format, new_preferred_mime, arraysz(dnd.format)-1); else dnd.format[0] = 0;