Trap xerrors in mutter_window_pre_paint

XDamageSubstract can create a BadDamage
(when the window goes away before XDamageSubstract is called)
and thus resulting into a crash.

Fix it by protecting the call with an error trap.

https://bugzilla.gnome.org/show_bug.cgi?id=623235
This commit is contained in:
Adel Gadllah 2010-08-23 22:26:02 +02:00
parent 4544fe7571
commit 2a54baf60e

View File

@ -1772,7 +1772,9 @@ mutter_window_pre_paint (MutterWindow *self)
if (priv->received_damage)
{
meta_error_trap_push (display);
XDamageSubtract (xdisplay, priv->damage, None, None);
meta_error_trap_pop (display, FALSE);
priv->received_damage = FALSE;
}