@@ -246,6 +246,9 @@ static void rlImGuiTriangleVert(ImDrawVert& idx_vert)
static void rlImGuiRenderTriangles(unsigned int count, int indexStart, const ImVector<ImDrawIdx>& indexBuffer, const ImVector<ImDrawVert>& vertBuffer, void* texturePtr)
{
+ if (count == 0)
+ return;
+
Texture* texture = (Texture*)texturePtr;
unsigned int textureId = (texture == nullptr) ? 0 : texture->id;