diff --git a/src/Draw.cpp b/src/Draw.cpp index 3993f11d..0a099d5f 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -119,6 +119,9 @@ BOOL StartDirectDraw(SDL_Window *window, int lMagnification) framebuffer = Backend_Init(window); + if (framebuffer == NULL) + return FALSE; + rgb24_pixel_format = SDL_AllocFormat(SDL_PIXELFORMAT_RGB24); return TRUE;