Fixed assert introduced in dafad3903e if there are no active draw list

This commit is contained in:
ocornut 2015-09-09 12:39:16 +01:00
parent b4f1e88860
commit fcbbb0070e

View File

@ -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;