tests/dbus: Check for error early
This gives a detailed error messages whereas checking if `proxy` is `NULL` tells us only that on error.
This commit is contained in:
committed by
Evangelos Ribeiro Tzaras
parent
8a4a7c6131
commit
ca4e77a8b0
@@ -31,8 +31,8 @@ find_pid_by_bus_name (const char *name)
|
|||||||
g_autoptr (GVariant) ret = NULL;
|
g_autoptr (GVariant) ret = NULL;
|
||||||
guint32 pid;
|
guint32 pid;
|
||||||
|
|
||||||
g_assert_nonnull (proxy);
|
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
|
g_assert_nonnull (proxy);
|
||||||
|
|
||||||
ret = g_dbus_proxy_call_sync (proxy,
|
ret = g_dbus_proxy_call_sync (proxy,
|
||||||
"GetConnectionUnixProcessID",
|
"GetConnectionUnixProcessID",
|
||||||
|
|||||||
Reference in New Issue
Block a user