vl.c: Avoid segfault when started with no arguments
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 22 Feb 2012 22:40:00 +0000 (22:40 +0000)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 24 Feb 2012 19:36:06 +0000 (13:36 -0600)
commit967c0da73a7b0da186baba6632301d83644a570c
tree0425c547fd37766839b52dd4e398e3cd304ceb94
parent9ebe95fb606a8d6bebe29de3efc9b506c6428c62
vl.c: Avoid segfault when started with no arguments

Fix a bug (introduced in commit a0abe47) where a command line which
specified no machine arguments (either explicitly or implicitly via
-kernel &co) would result in a segfault because of a NULL pointer
returned from qemu_opts_find(qemu_find_opts("machine"), 0).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c