git: 9front

Download patch

ref: 6a76d1c7eb45eeaa8edca2235cc28e5c9fc7dfd8
parent: 1a1971892a1a167a7abb52bc4ad7cfe068963421
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;
--