From 491edfd8d8ff7c17143b26cd25a4d63ebb1b5a25 Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 30 Sep 2017 23:46:23 +0200 Subject: [PATCH] Nav: Fixed a crash introduced yesterday. --- imgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 894bab7a..68f1e76c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5538,7 +5538,8 @@ void ImGui::FocusWindow(ImGuiWindow* window) g.NavLayer = 0; if (window && g.NavDisableMouseHover) g.NavMousePosDirty = true; - window->NavRectRel[0].Min = window->NavRectRel[0].Max = window ? (window->DC.CursorStartPos - window->Pos) : ImVec2(0,0); + if (window) + window->NavRectRel[0].Min = window->NavRectRel[0].Max = window->DC.CursorStartPos - window->Pos; g.NavWindow = window; }