aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2')
-rw-r--r--hardinfo2/udisks2_util.c7
-rw-r--r--hardinfo2/util.c3
2 files changed, 7 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();
}
}
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index 5e3b00aa..e12963c0 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -974,7 +974,10 @@ static GSList *modules_load(gchar ** module_list)
}
filenames = g_list_delete_link(filenames, item);
}
+#if GLIB_CHECK_VERSION(2,44,0)
+ //FIXME change this to not use g_steal_pointer
g_list_free_full (g_steal_pointer (&filenames), g_object_unref);
+#endif
g_dir_close(dir);
}