From 2a54baf60ec51c2d7a120b7c8f5de40711464618 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Mon, 23 Aug 2010 22:26:02 +0200 Subject: [PATCH] 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 --- src/compositor/mutter-window.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c index 145ca4d18..4de2daa99 100644 --- a/src/compositor/mutter-window.c +++ b/src/compositor/mutter-window.c @@ -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; }