mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
cmapcube: don't crash on initdraw failure
This commit is contained in:
parent
dbf57689c4
commit
2cb85891ba
1 changed files with 2 additions and 1 deletions
|
@ -185,7 +185,8 @@ void main(int argc, char **argv){
|
|||
break;
|
||||
}ARGEND
|
||||
|
||||
initdraw(0,0,0);
|
||||
if(initdraw(0,0,0) < 0)
|
||||
sysfatal("initdraw: %r");
|
||||
ncolor=256;
|
||||
for(i=0;i!=ncolor;i++)
|
||||
color[i] = allocimage(display, Rect(0, 0, 1, 1), CMAP8, 1, cmap2rgba(i));
|
||||
|
|
Loading…
Reference in a new issue