Skip to content

Commit

Permalink
Fixed crash if calling SDL_CreateShapedWindow() on unsupported platfo…
Browse files Browse the repository at this point in the history
…rms.
  • Loading branch information
philippwiesemann committed Jun 2, 2017
1 parent 545fba7 commit 0039499
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video/SDL_shape.c
Expand Up @@ -35,6 +35,10 @@ SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned
SDL_Window *result = NULL;
result = SDL_CreateWindow(title,-1000,-1000,w,h,(flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE) /* & (~SDL_WINDOW_SHOWN) */);
if(result != NULL) {
if (SDL_GetVideoDevice()->shape_driver.CreateShaper == NULL) {
SDL_DestroyWindow(result);
return NULL;
}
result->shaper = SDL_GetVideoDevice()->shape_driver.CreateShaper(result);
if(result->shaper != NULL) {
result->shaper->userx = x;
Expand Down

0 comments on commit 0039499

Please sign in to comment.