ref: 188543fda6514e880e7f25ad5e599220e763af40
parent: e8228856df1973edd0eaa4fdaa7c862bf9a75fcb
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jan 11 19:19:39 EST 2020
vnc/devdraw: fix topnwindows() panic when images are not windows (thanks aiju) see changeset 319be6cfe7ef
--- a/sys/src/cmd/vnc/devdraw.c
+++ b/sys/src/cmd/vnc/devdraw.c
@@ -2029,13 +2029,13 @@
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
--
⑨