From fcbbb0070eba7f36b65012d298ff4c6bb3117cf1 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 9 Sep 2015 12:39:16 +0100 Subject: [PATCH] Fixed assert introduced in dafad3903eabe7a73621259ddc34f43da99ddf18 if there are no active draw list --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index fc68eed8..70c94884 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2380,7 +2380,7 @@ void ImGui::Render() // Setup draw data g.RenderDrawData.Valid = true; - g.RenderDrawData.CmdLists = &g.RenderDrawLists[0][0]; + g.RenderDrawData.CmdLists = (g.RenderDrawLists[0].Size > 0) ? &g.RenderDrawLists[0][0] : NULL; g.RenderDrawData.CmdListsCount = g.RenderDrawLists[0].Size; g.RenderDrawData.TotalVtxCount = g.IO.MetricsRenderVertices; g.RenderDrawData.TotalIdxCount = g.IO.MetricsRenderIndices;