mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 15:30:50 +00:00
win32: Check internal data when positioning child windows
Under certain circumstances, processing events may try to position a child before it is fully initialized. Check the internal data before proceeding.
This commit is contained in:
parent
90fd2a3cbe
commit
9da46bc37f
1 changed files with 4 additions and 0 deletions
|
@ -376,6 +376,10 @@ bool WIN_SetWindowPositionInternal(SDL_Window *window, UINT flags, SDL_WindowRec
|
||||||
|
|
||||||
// Update any child windows
|
// Update any child windows
|
||||||
for (child_window = window->first_child; child_window; child_window = child_window->next_sibling) {
|
for (child_window = window->first_child; child_window; child_window = child_window->next_sibling) {
|
||||||
|
if (!child_window->internal) {
|
||||||
|
// This child window is not yet fully initialized.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!WIN_SetWindowPositionInternal(child_window, flags, SDL_WINDOWRECT_CURRENT)) {
|
if (!WIN_SetWindowPositionInternal(child_window, flags, SDL_WINDOWRECT_CURRENT)) {
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue