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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user