]> code.delx.au - gnu-emacs/commit
Avoid GTK 3 crash with icons and masks
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Mar 2016 23:46:28 +0000 (16:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Mar 2016 23:53:23 +0000 (16:53 -0700)
commit45577d548d3abfe504d3f936b3c9b997d0cf7f9c
tree58ef10604d72495109b310c94f319a9c9ac889c7
parente99ff6e85ae30d94150e5c67dff2dd81077a6692
Avoid GTK 3 crash with icons and masks

Problem reported by Mosè Giordano (Bug#18997).
* src/gtkutil.c (xg_get_pixbuf_from_pixmap): Remove.
(xg_get_pixbuf_from_pix_and_mask): Do not use
xg_get_pixbuf_from_pixmap, as it is poorly documented.  Instead,
invoke XGetPixel directly.  This is slow but speed is not
important here.  Also, fail for unusual situations (not TrueColor,
or images that are not 8 bits per sample) instead of displaying
junk or crashing.
src/gtkutil.c