[gnome-calendar/wip/gbsneto/gcal-event: 11/12] window: remove source when finalizing
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/gbsneto/gcal-event: 11/12] window: remove source when finalizing
- Date: Sun, 14 Feb 2016 08:18:16 +0000 (UTC)
commit 6537829571996b64ce29e5707bba5ef98f1d2423
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Feb 13 21:07:41 2016 -0200
window: remove source when finalizing
Sometimes we crash the window right after closing it
because we set a timeout for save_geometry() before
destroying it, and the timeout is called after the
window is destroyed.
src/gcal-window.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 078dfb7..961cf33 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1506,6 +1506,12 @@ gcal_window_finalize (GObject *object)
{
GcalWindow *window = GCAL_WINDOW (object);
+ if (window->save_geometry_timeout_id > 0)
+ {
+ g_source_remove (window->save_geometry_timeout_id);
+ window->save_geometry_timeout_id = 0;
+ }
+
g_clear_object (&window->manager);
g_clear_object (&window->views_switcher);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]