ref: 4de62918a318391390f2c39673366f2a198c552c
parent: b14d7ac38c9341e233eee10b74a6c0e716a7915f
author: cinap_lenrek <[email protected]>
date: Fri Aug 3 22:06:57 EDT 2012
catclock: properly handle initdraw error instead of crashing
--- a/sys/src/games/catclock.c
+++ b/sys/src/games/catclock.c
@@ -103,7 +103,8 @@
fprint(2, "Usage: %s [-c]\n", argv0);
exits("usage");
}ARGEND
- initdraw(0, 0, "cat clock");
+ if(initdraw(0, 0, "cat clock") < 0)
+ sysfatal("initdraw: %r");
einit(Emouse);
redraw(screen);
for(i=0; i<nelem(catback_bits); i++)