diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2015-11-26 10:58:10 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2015-11-26 10:58:10 +0000 |
| commit | fe4cf57da7a85fa65488448acdc22a65096e832a (patch) | |
| tree | 5f2a59e21481068c2a5455602be3012de75e0ee6 | |
| parent | b8b0ee0ea3d2789d8ee7372b9a173e7952e18087 (diff) | |
| parent | 7fe4a41c262e2529dc79f77f6fe63c5309fa2fd9 (diff) | |
| download | focaccia-qemu-fe4cf57da7a85fa65488448acdc22a65096e832a.tar.gz focaccia-qemu-fe4cf57da7a85fa65488448acdc22a65096e832a.zip | |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151126-1' into staging
vnc: fix segfault # gpg: Signature made Thu 26 Nov 2015 07:37:43 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-vnc-20151126-1: vnc: fix segfault Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | ui/vnc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c index c9f2fed9c9..7538405399 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -931,6 +931,11 @@ static void vnc_dpy_copy(DisplayChangeListener *dcl, int i, x, y, pitch, inc, w_lim, s; int cmp_bytes; + if (!vd->server) { + /* no client connected */ + return; + } + vnc_refresh_server_surface(vd); QTAILQ_FOREACH_SAFE(vs, &vd->clients, next, vn) { if (vnc_has_feature(vs, VNC_FEATURE_COPYRECT)) { |