calendar-monitor: Fix critical in finalize

self->thread can be NULL if gcal_calendar_monitor_set_range() was never
called prior to finalize. This is fine, so just check for NULL here
using g_clear_pointer().
This commit is contained in:
Michael Catanzaro
2020-04-02 01:54:33 +00:00
committed by Georges Basile Stavracas Neto
parent e816657116
commit 164ec8620b
+1 -1
View File
@@ -996,7 +996,7 @@ gcal_calendar_monitor_finalize (GObject *object)
g_cancellable_cancel (self->cancellable);
notify_view_thread (self, QUIT);
g_thread_join (self->thread);
g_clear_pointer (&self->thread, g_thread_join);
remove_all_events (self);