aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index a3d8d77bf8..73316cf17e 100644
--- a/vl.c
+++ b/vl.c
@@ -2724,7 +2724,10 @@ int main(int argc, char **argv, char **envp)
fprintf(stderr, "parse error: %s\n", optarg);
exit(1);
}
- machine = machine_parse(qemu_opt_get(opts, "type"));
+ optarg = qemu_opt_get(opts, "type");
+ if (optarg) {
+ machine = machine_parse(optarg);
+ }
break;
case QEMU_OPTION_usb:
usb_enabled = 1;