vmx(1): obsdfb: check if curmode is nil
This commit is contained in:
parent
da6e5efe39
commit
fb165d6a54
1 changed files with 1 additions and 1 deletions
|
@ -562,7 +562,7 @@ obsdfb(void)
|
||||||
extern VgaMode *curmode, textmode;
|
extern VgaMode *curmode, textmode;
|
||||||
extern uintptr fbaddr, fbsz;
|
extern uintptr fbaddr, fbsz;
|
||||||
|
|
||||||
if(curmode == &textmode) return;
|
if(curmode == nil || curmode == &textmode) return;
|
||||||
p = r = g = b = a = 0;
|
p = r = g = b = a = 0;
|
||||||
for(i = 0; i < 4; i++){
|
for(i = 0; i < 4; i++){
|
||||||
s = curmode->chan >> 8 * i & 0xf;
|
s = curmode->chan >> 8 * i & 0xf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue