Commit d77eaedd authored by Debarshi Ray's avatar Debarshi Ray

base-item: Simplify code

parent ef8a6f2f
......@@ -946,22 +946,18 @@ photos_base_item_process_idle (gpointer user_data)
{
GTask *task = G_TASK (user_data);
PhotosBaseItem *self;
GCancellable *cancellable;
gboolean result = FALSE;
self = PHOTOS_BASE_ITEM (g_task_get_source_object (task));
cancellable = g_task_get_cancellable (task);
if (g_cancellable_is_cancelled (cancellable))
if (g_task_return_error_if_cancelled (task))
goto done;
if (gegl_processor_work (self->priv->processor, NULL))
return G_SOURCE_CONTINUE;
result = TRUE;
g_task_return_boolean (task, TRUE);
done:
g_task_return_boolean (task, result);
return G_SOURCE_REMOVE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment