diff options
author | hwspeedy <ns@bigbear.dk> | 2024-02-24 04:01:13 +0100 |
---|---|---|
committer | hwspeedy <ns@bigbear.dk> | 2024-02-24 04:02:02 +0100 |
commit | bd00a3f86f09de5021c610bf7128045be87b76f5 (patch) | |
tree | 1f5b68662b6a65c7b5aff9e8a0f6adb88fa65665 /hardinfo2/udisks2_util.c | |
parent | b8d228a8978af7d04b7c7ea51ed411edc3448de3 (diff) |
FIX Crash - Udisks2 for non udisks2 installs
Diffstat (limited to 'hardinfo2/udisks2_util.c')
-rw-r--r-- | hardinfo2/udisks2_util.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hardinfo2/udisks2_util.c b/hardinfo2/udisks2_util.c index 42ca0e91..67a3e1e6 100644 --- a/hardinfo2/udisks2_util.c +++ b/hardinfo2/udisks2_util.c @@ -210,8 +210,12 @@ GDBusConnection* get_udisks2_connection(void) { return NULL; } + if(!result) { + return NULL; + }else{ + g_variant_unref(result); + } // OK, let's return connection to system bus - g_variant_unref(result); return conn; } @@ -629,7 +633,7 @@ GSList* get_udisks2_all_drives_info(void){ void udisks2_init(){ if (udisks2_conn == NULL){ - udisks2_conn = get_udisks2_connection(); + udisks2_conn = get_udisks2_connection(); } } |