diff --git a/ui/xemu-snapshots.c b/ui/xemu-snapshots.c index 5d436964fc..ae828fb1cc 100644 --- a/ui/xemu-snapshots.c +++ b/ui/xemu-snapshots.c @@ -229,11 +229,8 @@ char *xemu_get_currently_loaded_disc_path(void) continue; } - if (info->value->has_inserted) { - BlockDeviceInfo *inserted = info->value->inserted; - if (inserted->has_node_name) { - file = g_strdup(inserted->file); - } + if (info->value->inserted && info->value->inserted->node_name) { + file = g_strdup(info->value->inserted->file); } }