manager: fix reference management
GcalManager:remove_event() is an asynchronous function that, by the time the callback is executed, unreferences the event that is being removed. This implies that, when the function was called, a reference was taken -- we don't want the event to be finalized during the operation, after all. The problem is that the reference was never taken. Fix that by properly owning a reference to the event when removing it, and dropping it when the removal is finished. Issue: #268
This commit is contained in:
+1
-1
@@ -1715,7 +1715,7 @@ gcal_manager_remove_event (GcalManager *self,
|
||||
(ECalObjModType) mod,
|
||||
self->async_ops,
|
||||
on_event_removed,
|
||||
event);
|
||||
g_object_ref (event));
|
||||
|
||||
g_free (rid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user