File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,12 @@ extern "C" {
265
265
#include "SDL_utils_c.h"
266
266
#include "SDL_hashtable.h"
267
267
268
+ #define PUSH_SDL_ERROR () \
269
+ { char *_error = SDL_strdup(SDL_GetError());
270
+
271
+ #define POP_SDL_ERROR () \
272
+ SDL_SetError("%s", _error); SDL_free(_error); }
273
+
268
274
// Do any initialization that needs to happen before threads are started
269
275
extern void SDL_InitMainThread (void );
270
276
Original file line number Diff line number Diff line change @@ -2513,7 +2513,9 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
2513
2513
SDL_UpdateWindowHierarchy (window , parent );
2514
2514
2515
2515
if (_this -> CreateSDLWindow && !_this -> CreateSDLWindow (_this , window , props )) {
2516
+ PUSH_SDL_ERROR ()
2516
2517
SDL_DestroyWindow (window );
2518
+ POP_SDL_ERROR ()
2517
2519
return NULL ;
2518
2520
}
2519
2521
You can’t perform that action at this time.
0 commit comments