]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crashes when the _EMACS_DRAG_ATOM is the wrong type
authorPo Lu <luangruo@yahoo.com>
Sun, 19 Jun 2022 05:32:27 +0000 (13:32 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 19 Jun 2022 05:32:36 +0000 (13:32 +0800)
* src/xterm.c (xm_get_drag_atom_1): Don't use PropModeAppend if
rc != Success.

src/xterm.c

index d83a56a6cba2be57a2a1facd719824dd3b6328af..455d5b795e9b968cf9c396c7936ffcc4fb41ac6d 100644 (file)
@@ -2299,8 +2299,9 @@ xm_get_drag_atom_1 (struct x_display_info *dpyinfo,
 
       XChangeProperty (dpyinfo->display, dpyinfo->root_window,
                       dpyinfo->Xatom_EMACS_DRAG_ATOM, XA_ATOM, 32,
-                      (rc == Success && (actual_format != 32
-                                         || actual_type != XA_ATOM)
+                      (rc != Success
+                       || (actual_format != 32
+                           || actual_type != XA_ATOM)
                        ? PropModeReplace : PropModeAppend),
                       (unsigned char *) &atom, 1);