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;