Handle the framebuffer failing to lock
Also needed by SDL2
This commit is contained in:
parent
e90b903692
commit
f42a0530b0
1 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ void RenderBackend_UnlockSurface(RenderBackend_Surface *surface, unsigned int wi
|
|||
|
||||
ATTRIBUTE_HOT void RenderBackend_Blit(RenderBackend_Surface *source_surface, const RenderBackend_Rect *rect, RenderBackend_Surface *destination_surface, long x, long y, bool colour_key)
|
||||
{
|
||||
if (source_surface == NULL || destination_surface == NULL)
|
||||
if (source_surface == NULL || source_surface->pixels == NULL || destination_surface == NULL || destination_surface->pixels == NULL)
|
||||
return;
|
||||
|
||||
RenderBackend_Rect rect_clamped;
|
||||
|
@ -214,7 +214,7 @@ ATTRIBUTE_HOT void RenderBackend_Blit(RenderBackend_Surface *source_surface, con
|
|||
|
||||
ATTRIBUTE_HOT void RenderBackend_ColourFill(RenderBackend_Surface *surface, const RenderBackend_Rect *rect, unsigned char red, unsigned char green, unsigned char blue)
|
||||
{
|
||||
if (surface == NULL)
|
||||
if (surface == NULL || surface->pixels == NULL)
|
||||
return;
|
||||
|
||||
RenderBackend_Rect rect_clamped;
|
||||
|
|
Loading…
Add table
Reference in a new issue