summaryrefslogtreecommitdiff
path: root/sys/src/cmd/vnc
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-01-12 00:19:39 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-01-12 00:19:39 +0100
commit7cf8369411a3b9348f862bccaa4147b9aaf38e67 (patch)
tree2ba58e1d031019040647ff0e2c12c383a724d9a3 /sys/src/cmd/vnc
parent16784a2e45937c6d4df5fe21c0838f8a7dfeb0a7 (diff)
vnc/devdraw: fix topnwindows() panic when images are not windows (thanks aiju)
see changeset 319be6cfe7ef
Diffstat (limited to 'sys/src/cmd/vnc')
-rw-r--r--sys/src/cmd/vnc/devdraw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/cmd/vnc/devdraw.c b/sys/src/cmd/vnc/devdraw.c
index 48ec63e03..315de13a5 100644
--- a/sys/src/cmd/vnc/devdraw.c
+++ b/sys/src/cmd/vnc/devdraw.c
@@ -2029,13 +2029,13 @@ drawmesg(Client *client, void *av, int n)
free(lp);
nexterror();
}
- for(j=0; j<nw; j++)
+ for(j=0; j<nw; j++){
lp[j] = drawimage(client, a+1+1+2+j*4);
- if(lp[0]->layer == 0)
- error("images are not windows");
- for(j=1; j<nw; j++)
+ if(lp[j]->layer == 0)
+ error("images are not windows");
if(lp[j]->layer->screen != lp[0]->layer->screen)
error("images not on same screen");
+ }
if(a[1])
memltofrontn(lp, nw);
else