diff options
author | Dan Winship <danw@gnome.org> | 2011-07-12 13:07:15 -0400 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2014-10-08 18:44:07 +0300 |
commit | e35be641fcb2f931ba50937e258ce8e02a350281 (patch) | |
tree | 08e99de2858944deb26f7e02556e5685cde1d9ec | |
parent | 04d8135fc62889d690f947d798d555e4aa8543ef (diff) | |
download | metacity-e35be641fcb2f931ba50937e258ce8e02a350281.tar.gz |
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
-rw-r--r-- | 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 518a46b8..42cfd578 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); } |