[gnome-control-center] printers: Fix incorrect g_task_run_in_thread reference usage
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Fix incorrect g_task_run_in_thread reference usage
- Date: Wed, 28 Nov 2018 11:56:26 +0000 (UTC)
commit 172ab6ef6c52d8e79129c011d14c390924f81a86
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Nov 23 10:54:27 2018 +1300
printers: Fix incorrect g_task_run_in_thread reference usage
There is a reference held during this call so don't need to
explicitly unref inside the function.
panels/printers/pp-host.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c
index 6db591d32..ea5e0d16d 100644
--- a/panels/printers/pp-host.c
+++ b/panels/printers/pp-host.c
@@ -749,7 +749,6 @@ _pp_host_get_lpd_devices_thread (GTask *task,
out:
g_task_return_pointer (task, devices, (GDestroyNotify) pp_devices_list_free);
- g_object_unref (task);
g_free (address);
}
@@ -760,7 +759,7 @@ pp_host_get_lpd_devices_async (PpHost *host,
GAsyncReadyCallback callback,
gpointer user_data)
{
- GTask *task;
+ g_autoptr(GTask) task = NULL;
task = g_task_new (G_OBJECT (host), cancellable, callback, user_data);
g_task_run_in_thread (task, _pp_host_get_lpd_devices_thread);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]