Browse Source

don't try to index counts < 3

Jeffery Myers 3 years ago
parent
commit
8ef861be49
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rlImGui.cpp

+ 1 - 1
rlImGui.cpp

@@ -246,7 +246,7 @@ static void rlImGuiTriangleVert(ImDrawVert& idx_vert)
 
 
 static void rlImGuiRenderTriangles(unsigned int count, int indexStart, const ImVector<ImDrawIdx>& indexBuffer, const ImVector<ImDrawVert>& vertBuffer, void* texturePtr)
 static void rlImGuiRenderTriangles(unsigned int count, int indexStart, const ImVector<ImDrawIdx>& indexBuffer, const ImVector<ImDrawVert>& vertBuffer, void* texturePtr)
 {
 {
-    if (count == 0)
+    if (count < 3)
         return;
         return;
 	
 	
     Texture* texture = (Texture*)texturePtr;
     Texture* texture = (Texture*)texturePtr;