diff options
author | bigbear <ns@bigbear.dk> | 2024-02-08 03:08:54 +0100 |
---|---|---|
committer | bigbear <ns@bigbear.dk> | 2024-02-08 19:52:53 +0100 |
commit | 33d6c7101cee251b91b4f01b2ddde55b4b2d50d9 (patch) | |
tree | 49ae675f7d68b90415db69bfcd21fe84fa74013d /hardinfo2/udisks2_util.c | |
parent | 1dc1f18804969c191346b064cd232d3f5959b13c (diff) |
FIX back ports
Diffstat (limited to 'hardinfo2/udisks2_util.c')
-rw-r--r-- | hardinfo2/udisks2_util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hardinfo2/udisks2_util.c b/hardinfo2/udisks2_util.c index 4c9a4c9b..e1567d84 100644 --- a/hardinfo2/udisks2_util.c +++ b/hardinfo2/udisks2_util.c @@ -279,7 +279,7 @@ void udiskd_free(udiskd *u) { udiskp* get_udisks2_partition_info(const gchar *part_path) { GVariant *v; - GDBusProxy *proxy; + GDBusProxy *proxy=NULL; GError *error = NULL; udiskp* partition; const gchar *str; @@ -294,7 +294,8 @@ udiskp* get_udisks2_partition_info(const gchar *part_path) { proxy = g_dbus_proxy_new_sync(udisks2_conn, G_DBUS_PROXY_FLAGS_NONE, NULL, UDISKS2_INTERFACE, part_path, DBUS_PROPERTIES_INTERFACE, NULL, &error); - if (error == NULL) { + + if ((proxy != NULL) && (error == NULL)) { v = get_dbus_property(proxy, UDISKS2_BLOCK_INTERFACE, "IdLabel"); if (v) { str = g_variant_get_string(v, NULL); @@ -628,7 +629,7 @@ GSList* get_udisks2_all_drives_info(void){ void udisks2_init(){ if (udisks2_conn == NULL){ - udisks2_conn = get_udisks2_connection(); + //FIXME udisks2_conn = get_udisks2_connection(); } } |