]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crash when windows are destroyed by faulty clients
authorPo Lu <luangruo@yahoo.com>
Sat, 26 Mar 2022 04:20:23 +0000 (12:20 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 26 Mar 2022 04:20:23 +0000 (12:20 +0800)
* src/xterm.c (x_dnd_compute_toplevels): Make sure
property_reply is non-NULL before testing its format and length.

src/xterm.c

index e20efd67c79a7521879e2600fb25095c9d5c12f9..7edec2cd4017347b05fab4c5bdff77b9b034f1da 100644 (file)
@@ -1025,8 +1025,9 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo)
          free (error);
        }
 
-      if (xcb_get_property_value_length (property_reply) != 8
-         || property_reply->format != 32)
+      if (property_reply
+         && (xcb_get_property_value_length (property_reply) != 8
+             || property_reply->format != 32))
        rc = false;
 
       geometry_reply = xcb_get_geometry_reply (dpyinfo->xcb_connection,