[metacity] fix a crash-on-exit
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] fix a crash-on-exit
- Date: Wed, 8 Oct 2014 18:30:48 +0000 (UTC)
commit e35be641fcb2f931ba50937e258ce8e02a350281
Author: Dan Winship <danw gnome org>
Date: Tue Jul 12 13:07:15 2011 -0400
fix a crash-on-exit
meta_frames_destroy() was not safe to be called multiple times, which
was causing a crash on exit due to something else changing somewhere
that makes it get called multiple times.
https://bugzilla.gnome.org/show_bug.cgi?id=654489
src/ui/frames.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 518a46b..42cfd57 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -310,8 +310,17 @@ meta_frames_destroy (GtkWidget *widget)
}
g_slist_free (winlist);
- g_object_unref (frames->normal_style);
- g_hash_table_destroy (frames->style_variants);
+ if (frames->normal_style)
+ {
+ g_object_unref (frames->normal_style);
+ frames->normal_style = NULL;
+ }
+
+ if (frames->style_variants)
+ {
+ g_hash_table_destroy (frames->style_variants);
+ frames->style_variants = NULL;
+ }
GTK_WIDGET_CLASS (meta_frames_parent_class)->destroy (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]