shithub: cstory

Download patch

ref: aa9e48608679f4d35df1ec237e8529284c5a3869
parent: d70e31d22122a8aac852b6a50ff53420f003602e
author: Clownacy <[email protected]>
date: Mon Apr 13 09:49:21 EDT 2020

Handle WindowBackend_Software_CreateWindow fail

Must have been part of that commit I reverted

--- a/src/Backends/Rendering/Software.cpp
+++ b/src/Backends/Rendering/Software.cpp
@@ -41,6 +41,12 @@
 	framebuffer.height = screen_height;
 	framebuffer.pitch = pitch;
 
+	if (framebuffer.pixels == NULL)
+	{
+		Backend_PrintError("Failed to create window");
+		return NULL;
+	}
+
 	return &framebuffer;
 }