From a17e47fe14a1745c0e275f869fd1b69ebb499fc5 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 6 Jul 2015 20:38:06 -0600 Subject: [PATCH] ImDrawList: fixed non-merged commands when equal clip rectangles are in the two first commands --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 6ae3ad86..3fe021d5 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9025,7 +9025,7 @@ void ImDrawList::UpdateClipRect() else { ImVec4 current_clip_rect = clip_rect_stack.empty() ? GNullClipRect : clip_rect_stack.back(); - if (commands.size() > 2 && ImLengthSqr(commands[commands.size()-2].clip_rect - current_clip_rect) < 0.00001f) + if (commands.size() >= 2 && ImLengthSqr(commands[commands.size()-2].clip_rect - current_clip_rect) < 0.00001f) commands.pop_back(); else current_cmd->clip_rect = current_clip_rect;