aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 3ce3a5beec..f183d00deb 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -143,6 +143,11 @@ static void vnc_init_basic_info_from_server_addr(QIOChannelSocket *ioc,
{
SocketAddress *addr = NULL;
+ if (!ioc) {
+ error_setg(errp, "No listener socket available");
+ return;
+ }
+
addr = qio_channel_socket_get_local_address(ioc, errp);
if (!addr) {
return;