shithub: riscv

Download patch

ref: 5935eeb6de5597072b083fadbcc3f9e94d1e36c1
parent: 11b5e0ac146f502e44f0a6a63c1b241b61ff1448
author: ftrvxmtrx <[email protected]>
date: Mon Dec 29 11:43:33 EST 2014

aux/vga: scale only if mode was set successfully

--- a/sys/src/cmd/aux/vga/vesa.c
+++ b/sys/src/cmd/aux/vga/vesa.c
@@ -280,8 +280,7 @@
 	if(vbesetmode(vbe, atoi(dbattr(vga->mode->attr, "id"))) < 0){
 		ctlr->flag |= Ferror;
 		fprint(2, "vbesetmode: %r\n");
-	}
-	if(vbe->scale != nil)
+	}else if(vbe->scale != nil)
 		vbe->scale(vga, ctlr);
 }