From 6024051a2fcfc75d640ba5ed1660bc607ad49937 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 29 Oct 2019 21:18:01 +0100 Subject: [PATCH] Viewport: Fixed 32380a0 (#2876) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index de3ca78c6..48898ba8c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10252,7 +10252,7 @@ void ImGui::SetCurrentViewport(ImGuiWindow* current_window, ImGuiViewportP* view viewport->LastFrameActive = g.FrameCount; if (g.CurrentViewport == viewport) return; - g.CurrentDpiScale = viewport->DpiScale; + g.CurrentDpiScale = viewport ? viewport->DpiScale : 1.0f; g.CurrentViewport = viewport; //IMGUI_DEBUG_LOG_VIEWPORT("SetCurrentViewport changed '%s' 0x%08X\n", current_window ? current_window->Name : NULL, viewport ? viewport->ID : 0);