This can happen when a device is ejected and it changes size to
zero. In that situation, old stale partition objects may be lying
around.
Signed-off-by: David Zeuthen <davidz@redhat.com>
g_return_val_if_fail (UDISKS_IS_PARTITION (partition), NULL);
table = udisks_client_get_partition_table (client, partition);
+ if (table == NULL)
+ goto out;
flags = udisks_partition_get_flags (partition);
if (g_strcmp0 (udisks_partition_table_get_type_ (table), "dos") == 0)
g_free (flags_str);
g_object_unref (table);
+ out:
return ret;
}