shithub: cstory

Download patch

ref: c2daebe38aa7fd475d336bccfc5bbdf5583f3351
parent: 785131a184b45b285acb52e289288e07091d460c
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Oct 26 21:57:09 EDT 2019

Handle Backend_Init failing

Should really give those render-backend functions a different prefix.

--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -119,6 +119,9 @@
 
 	framebuffer = Backend_Init(window);
 
+	if (framebuffer == NULL)
+		return FALSE;
+
 	rgb24_pixel_format = SDL_AllocFormat(SDL_PIXELFORMAT_RGB24);
 
 	return TRUE;
--