devvga: check if screen is setup before accepting hwgc vgactl

This commit is contained in:
cinap_lenrek 2013-01-03 15:33:51 +01:00
parent da0638914f
commit 34d0aae672

View file

@ -257,6 +257,9 @@ vgactl(Cmdbuf *cb)
ct = lookupcmd(cb, vgactlmsg, nelem(vgactlmsg));
switch(ct->index){
case CMhwgc:
if(scr->gscreen == nil)
error("hwgc: no gscreen");
if(strcmp(cb->f[1], "off") == 0){
lock(&cursor);
if(scr->cur){