mirror of
https://github.com/ocornut/imgui.git
synced 2025-04-07 14:29:40 +00:00
Fixed IsRootWindowOrAnyChildFocused() crashing if no window has focus (introduced yesterday in c38c54af52
)
This commit is contained in:
parent
6e99688fa7
commit
3c6257b8b9
1 changed files with 1 additions and 1 deletions
|
@ -3808,7 +3808,7 @@ bool ImGui::IsRootWindowOrAnyChildFocused()
|
|||
{
|
||||
ImGuiState& g = *GImGui;
|
||||
ImGuiWindow* root_window = GetCurrentWindow()->RootWindow;
|
||||
return g.FocusedWindow->RootWindow == root_window;
|
||||
return g.FocusedWindow && g.FocusedWindow->RootWindow == root_window;
|
||||
}
|
||||
|
||||
float ImGui::GetWindowWidth()
|
||||
|
|
Loading…
Add table
Reference in a new issue