diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/gncal-full-day.c | 18 | ||||
-rw-r--r-- | calendar/gui/main.c | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/calendar/gui/gncal-full-day.c b/calendar/gui/gncal-full-day.c index 41d217cb6e..618d1c039d 100644 --- a/calendar/gui/gncal-full-day.c +++ b/calendar/gui/gncal-full-day.c @@ -1150,12 +1150,20 @@ gncal_full_day_unrealize (GtkWidget *widget) gdk_cursor_destroy (fullday->beam_cursor); fullday->beam_cursor = NULL; - gdk_gc_destroy (fullday->bell_gc); - gdk_gc_destroy (fullday->recur_gc); - gdk_pixmap_unref (pixmap_bell); - gdk_pixmap_unref (pixmap_recur); + if (fullday->bell_gc) + gdk_gc_destroy (fullday->bell_gc); + if (fullday->recur_gc) + gdk_gc_destroy (fullday->recur_gc); + + if (pixmap_bell){ + gdk_pixmap_unref (pixmap_bell); + pixmap_bell = NULL; + } - pixmap_bell = NULL; + if (pixmap_recur){ + gdk_pixmap_unref (pixmap_recur); + pixmap_recur = NULL; + } if (GTK_WIDGET_CLASS (parent_class)->unrealize) (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); diff --git a/calendar/gui/main.c b/calendar/gui/main.c index dec25e737c..bdb6a0d1c3 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -173,7 +173,7 @@ close_cmd (GtkWidget *widget, GnomeCalendar *gcal) calendar_save (gcal->cal, gcal->cal->filename); } -/* gtk_widget_destroy (GTK_WIDGET (gcal)); */ + gtk_widget_destroy (GTK_WIDGET (gcal)); active_calendars--; if (active_calendars == 0) |