summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-02-28 11:44:53 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-02-28 11:44:53 +0100
commit02dce7a2e4fd74d918cf7cd1f23fc99279365eb9 (patch)
treeb9f70aef568c4499e531ad0384d14b5960b8a9c2 /sys/src/games
parent4a9239723609d4f850b1aa7083b712682027136a (diff)
games/doom: handle allocimage() failure
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/doom/i_video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/games/doom/i_video.c b/sys/src/games/doom/i_video.c
index 334ef567e..5ce432edf 100644
--- a/sys/src/games/doom/i_video.c
+++ b/sys/src/games/doom/i_video.c
@@ -96,7 +96,7 @@ void I_FinishUpdate(void)
if(resized){
resized = 0;
if(getwindow(display, Refnone) < 0)
- sysfatal("getwindow failed: %r");
+ sysfatal("getwindow: %r");
/* make black background */
draw(screen, screen->r, display->black, nil, ZP);
@@ -117,6 +117,8 @@ void I_FinishUpdate(void)
/* the row image, y-axis gets scaled with repl flag */
rowimg = allocimage(display, Rect(0, 0, scale*SCREENWIDTH, 1), RGB24, 1, DNofill);
+ if(rowimg == nil)
+ sysfatal("allocimage: %r");
s = screens[0];
for(y = 0; y < SCREENHEIGHT; y++){