iconcache: don't crash on a non-alpha mask pixmap
We assume when applying a mask that it is a depth-1 pixmap that cairo interprets as alpha. So ignore a non-depth-1 mask. https://bugzilla.gnome.org/show_bug.cgi?id=641975
This commit is contained in:
parent
654d966e6c
commit
82db52aaf4
@ -434,10 +434,11 @@ try_pixmap_and_mask (MetaDisplay *display,
|
|||||||
|
|
||||||
if (unscaled && src_mask != None)
|
if (unscaled && src_mask != None)
|
||||||
{
|
{
|
||||||
get_pixmap_geometry (display, src_mask, &w, &h, NULL);
|
get_pixmap_geometry (display, src_mask, &w, &h, &d);
|
||||||
mask = meta_gdk_pixbuf_get_from_pixmap (src_mask,
|
if (d == 1)
|
||||||
0, 0,
|
mask = meta_gdk_pixbuf_get_from_pixmap (src_mask,
|
||||||
w, h);
|
0, 0,
|
||||||
|
w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
Loading…
Reference in New Issue
Block a user