[gnome-calendar/mcatanzaro/gthread-join] calendar-monitor: Fix critical in finalize
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/mcatanzaro/gthread-join] calendar-monitor: Fix critical in finalize
- Date: Thu, 2 Apr 2020 01:28:13 +0000 (UTC)
commit ba61cb32780d854a71d9debfa09de21a5caac5c1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Apr 1 20:26:54 2020 -0500
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().
src/core/gcal-calendar-monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/core/gcal-calendar-monitor.c b/src/core/gcal-calendar-monitor.c
index 0a704f13..f5e58b90 100644
--- a/src/core/gcal-calendar-monitor.c
+++ b/src/core/gcal-calendar-monitor.c
@@ -991,7 +991,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]