Adding g_task_set_return_on_cancel.

This commit is contained in:
sergiotarxz 2022-01-23 11:03:40 +01:00
parent 2c2e1d550e
commit 84c47861ad
2 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,6 @@ mg_util_soup_get_request (MgUtilSoup *self, const char *url, gsize *size_respons
g_value_unset (&response); g_value_unset (&response);
g_clear_object (&soup_session); g_clear_object (&soup_session);
g_clear_object (&msg); g_clear_object (&msg);
return return_value; return return_value;
} }

View File

@ -126,6 +126,7 @@ create_picture_from_url (const char *const url, gint picture_size,
attrs->image = image; attrs->image = image;
attrs->picture_size = picture_size; attrs->picture_size = picture_size;
g_task_set_task_data (task, attrs, free_picture_thread_attributes); g_task_set_task_data (task, attrs, free_picture_thread_attributes);
g_task_set_return_on_cancel (task, true);
g_task_run_in_thread (task, threaded_picture_recover); g_task_run_in_thread (task, threaded_picture_recover);
} }
cleanup_create_picture_from_url: cleanup_create_picture_from_url: