Преглед изворни кода

Actually return an error when the surface is invalid

Sam Lantinga пре 1 година
родитељ
комит
065ec2d518
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/render/SDL_render.c

+ 1 - 0
src/render/SDL_render.c

@@ -1159,6 +1159,7 @@ SDL_Renderer *SDL_CreateSoftwareRenderer(SDL_Surface *surface)
 
 
 	if (!surface) {
 	if (!surface) {
         SDL_InvalidParamError("surface");
         SDL_InvalidParamError("surface");
+		return NULL;
 	}
 	}
 
 
     SDL_PropertiesID props = SDL_CreateProperties();
     SDL_PropertiesID props = SDL_CreateProperties();