aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/vnc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index be384a5315..54bc5adab6 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2849,6 +2849,10 @@ int vnc_display_pw_expire(DisplayState *ds, time_t expires)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
+ if (!vs) {
+ return -EINVAL;
+ }
+
vs->expires = expires;
return 0;
}