diff --git a/imgui.cpp b/imgui.cpp index df2575b15e9e..c4c403c550ae 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3835,11 +3835,14 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window) { ImGuiContext& g = *GImGui; - - for (int i = 0; i < DC.Layouts.Data.Size; i++) + if (window != NULL) { - ImGuiLayout* layout = (ImGuiLayout*)DC.Layouts.Data[i].val_p; - IM_DELETE(layout); + + for (int i = 0; i < window->DC.Layouts.Data.Size; i++) + { + ImGuiLayout* layout = (ImGuiLayout*)window->DC.Layouts.Data[i].val_p; + IM_DELETE(layout); + } } // While most behaved code would make an effort to not steal active id during window move/drag operations, // we at least need to be resilient to it. Cancelling the move is rather aggressive and users of 'master' branch diff --git a/premake5.lua b/premake5.lua index 72f448c4b91b..b4250ca1dad0 100644 --- a/premake5.lua +++ b/premake5.lua @@ -3,8 +3,8 @@ project "ImGui" language "C++" staticruntime "off" - targetdir ("bin/" .. outputdir .. "/%{prj.name}") - objdir ("bin-int/" .. outputdir .. "/%{prj.name}") + targetdir ("bin/" .. OutputDir .. "/%{prj.name}") + objdir ("bin-int/" .. OutputDir .. "/%{prj.name}") files {