From 41f47c853bf300024a70482f3de76c6f2b68833c Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 6 Jun 2020 20:35:29 +0200 Subject: [PATCH] ImDrawList: Amend 0320e72 removed an unnecessary test. --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index d5844dbea..97a5c9f76 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -482,7 +482,7 @@ void ImDrawList::UpdateTextureID() // If current command is used with different settings we need to add a new command const ImTextureID curr_texture_id = GetCurrentTextureId(); ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1]; - if (!curr_cmd || (curr_cmd->ElemCount != 0 && curr_cmd->TextureId != curr_texture_id) || curr_cmd->UserCallback != NULL) + if ((curr_cmd->ElemCount != 0 && curr_cmd->TextureId != curr_texture_id) || curr_cmd->UserCallback != NULL) { AddDrawCmd(); return;