ref: 617bf42890380103283e49d0c2686de3db932655
parent: 4885c75526f91ff9eb245b32a63512e2e67b3038
author: mischief <mischief@offblast.org>
date: Wed Mar 6 14:10:48 EST 2019
vmx: check for draw initialization errors
--- a/sys/src/cmd/vmx/vga.c
+++ b/sys/src/cmd/vmx/vga.c
@@ -756,8 +756,8 @@
sysfatal("got nil ptr for framebuffer");
}
snprint(buf, sizeof(buf), "-dx %d -dy %d", maxw+50, maxh+50);
- newwindow(buf);
- initdraw(nil, nil, "vmx");
+ if(newwindow(buf) < 0 || initdraw(nil, nil, "vmx") < 0)
+ sysfatal("failed to initialize graphics: %r");
screeninit(1);
flushimage(display, 1);
kbdlayout("/sys/lib/kbmap/us");