ref: d725db70a344fbec2eb8924e800bc4c9624d345a
parent: 52e7dc9b795f3b880b534dcf09b687835e6e6905
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");--
⑨