Fix crash when retrieving window property with invalid atom data
This happens when dropping files from dtfile, which somehow puts non-atom stuff in window properties of type ATOM_PAIR. * src/xselect.c (x_atom_to_symbol): Catch errors around XGetAtomName.
This commit is contained in:
parent
f66a47b5bc
commit
ca5f259cff
1 changed files with 2 additions and 0 deletions
|
@ -285,7 +285,9 @@ x_atom_to_symbol (struct x_display_info *dpyinfo, Atom atom)
|
|||
return QNULL;
|
||||
|
||||
block_input ();
|
||||
x_catch_errors (dpyinfo->display);
|
||||
str = XGetAtomName (dpyinfo->display, atom);
|
||||
x_uncatch_errors ();
|
||||
unblock_input ();
|
||||
TRACE1 ("XGetAtomName --> %s", str);
|
||||
if (! str) return Qnil;
|
||||
|
|
Loading…
Add table
Reference in a new issue