فهرست منبع

Actually return an error when the surface is invalid

Sam Lantinga 9 ماه پیش
والد
کامیت
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) {
         SDL_InvalidParamError("surface");
+		return NULL;
 	}
 
     SDL_PropertiesID props = SDL_CreateProperties();