aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 5856396d46..0adbbd6747 100644
--- a/vl.c
+++ b/vl.c
@@ -2061,7 +2061,6 @@ static void select_vgahw (const char *p)
static DisplayType select_display(const char *p)
{
- Error *err = NULL;
const char *opts;
DisplayType display = DT_DEFAULT;
@@ -2130,6 +2129,7 @@ static DisplayType select_display(const char *p)
} else if (strstart(p, "vnc", &opts)) {
#ifdef CONFIG_VNC
if (*opts == '=') {
+ Error *err = NULL;
if (vnc_parse(opts + 1, &err) == NULL) {
error_report_err(err);
exit(1);