From a8dd4127f37c52cbd166eecf23a068b3687c1bb1 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Mon, 5 Apr 2021 13:59:52 +0200 Subject: [PATCH] Added security check to avoid internal render batch overflow --- src/textures.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/textures.c b/src/textures.c index cea8bef1..c8a19be1 100644 --- a/src/textures.c +++ b/src/textures.c @@ -3236,6 +3236,8 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 bottomRight.x = x + (dx + dest.width)*cosRotation - (dy + dest.height)*sinRotation; bottomRight.y = y + (dx + dest.width)*sinRotation + (dy + dest.height)*cosRotation; } + + rlCheckRenderBatchLimit(4); // Make sure there is enough free space on the batch buffer rlSetTexture(texture.id); rlBegin(RL_QUADS);