core/calendar-monitor: Transfer event ownership properly
g_steal_pointer() is not enough, since the event is not declared
with g_autoptr.
Use g_object_ref().
Fixes: f7ee9279ad
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1097
This commit is contained in:
@@ -622,11 +622,11 @@ on_client_view_objects_modified_cb (ECalClientView *view,
|
|||||||
if (old_event)
|
if (old_event)
|
||||||
{
|
{
|
||||||
g_hash_table_remove (events_to_remove, gcal_event_get_uid (event));
|
g_hash_table_remove (events_to_remove, gcal_event_get_uid (event));
|
||||||
g_ptr_array_add (events_to_update, g_steal_pointer (&event));
|
g_ptr_array_add (events_to_update, g_object_ref (event));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_ptr_array_add (events_to_add, g_steal_pointer (&event));
|
g_ptr_array_add (events_to_add, g_object_ref (event));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user