mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
Fixed crash if video isn't initialized in SDL_CreatePopupWindow()
This commit is contained in:
@@ -1996,6 +1996,11 @@ SDL_Window *SDL_CreateWindowWithPosition(const char *title, int x, int y, int w,
|
|||||||
|
|
||||||
SDL_Window *SDL_CreatePopupWindow(SDL_Window *parent, int offset_x, int offset_y, int w, int h, Uint32 flags)
|
SDL_Window *SDL_CreatePopupWindow(SDL_Window *parent, int offset_x, int offset_y, int w, int h, Uint32 flags)
|
||||||
{
|
{
|
||||||
|
if (_this == NULL) {
|
||||||
|
SDL_UninitializedVideo();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(_this->quirk_flags & VIDEO_DEVICE_QUIRK_HAS_POPUP_WINDOW_SUPPORT)) {
|
if (!(_this->quirk_flags & VIDEO_DEVICE_QUIRK_HAS_POPUP_WINDOW_SUPPORT)) {
|
||||||
SDL_Unsupported();
|
SDL_Unsupported();
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user