Fix GcalContext management
GObject automatically notifies when passing properties as part of g_object_new(). This happens after the instance is created, thus after constructed(). By passing G_PARAM_EXPLICIT_NOTIFY, we avoid this behavior. However, we are still notifying PROP_CONTEXT in GcalWindow. Removing this other notify fixes the crashes related to GcalContext. https://gitlab.gnome.org/GNOME/gnome-calendar/issues/417
This commit is contained in:
@@ -2182,6 +2182,7 @@ gcal_month_view_set_property (GObject *object,
|
||||
break;
|
||||
|
||||
case PROP_CONTEXT:
|
||||
g_assert (self->context == NULL);
|
||||
self->context = g_value_dup_object (value);
|
||||
|
||||
for (i = 0; i < 42; i++)
|
||||
@@ -2199,8 +2200,6 @@ gcal_month_view_set_property (GObject *object,
|
||||
self,
|
||||
0);
|
||||
update_weather (self, TRUE);
|
||||
|
||||
g_object_notify (object, "context");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user