games/doom: handle allocimage() failure

This commit is contained in:
cinap_lenrek 2016-02-28 11:44:53 +01:00
parent 4a92397236
commit 02dce7a2e4

View file

@ -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++){