[mutter] Trap xerrors in mutter_window_pre_paint
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Trap xerrors in mutter_window_pre_paint
- Date: Mon, 23 Aug 2010 20:32:04 +0000 (UTC)
commit 2a54baf60ec51c2d7a120b7c8f5de40711464618
Author: Adel Gadllah <adel gadllah gmail com>
Date: Mon Aug 23 22:26:02 2010 +0200
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c
index 145ca4d..4de2daa 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]