shithub: riscv

Download patch

ref: fb165d6a54e46712036ec1cf4332905b94c1f97b
parent: da6e5efe394ccb8e5edff66f9ec3ac8d9b1ed081
author: aiju <devnull@localhost>
date: Tue Jun 20 14:21:47 EDT 2017

vmx(1): obsdfb: check if curmode is nil

--- a/sys/src/cmd/vmx/ksetup.c
+++ b/sys/src/cmd/vmx/ksetup.c
@@ -562,7 +562,7 @@
 	extern VgaMode *curmode, textmode;
 	extern uintptr fbaddr, fbsz;
 
-	if(curmode == &textmode) return;
+	if(curmode == nil || curmode == &textmode) return;
 	p = r = g = b = a = 0;
 	for(i = 0; i < 4; i++){
 		s = curmode->chan >> 8 * i & 0xf;