From d05c1d58c3a84fd9a614c3adfa64bcae4241ca74 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 27 May 2015 15:44:07 +0100 Subject: [PATCH] Oops --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 93960eecc..d595cf8f1 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4116,7 +4116,7 @@ void ImGui::PopTextWrapPos() { ImGuiWindow* window = GetCurrentWindow(); window->DC.TextWrapPosStack.pop_back(); - window->DC.TextWrapPos = window->DC.TextWrapPosStack.back(); + window->DC.TextWrapPos = window->DC.TextWrapPosStack.empty() ? -1.0f : window->DC.TextWrapPosStack.back(); } void ImGui::PushStyleColor(ImGuiCol idx, const ImVec4& col)