summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2023-08-17 15:05:52 +0200
committerRay <[email protected]>2023-08-17 15:05:52 +0200
commite4dcbd518091a5854a517ea4cfc3f7e2d29de1a7 (patch)
tree29b64368f07f102e8f5a475c9a4aeabef6319f04
parenta86c93ebc0095f6c2ffc14656bfc9e1e37070f72 (diff)
downloadraylib-e4dcbd518091a5854a517ea4cfc3f7e2d29de1a7.tar.gz
raylib-e4dcbd518091a5854a517ea4cfc3f7e2d29de1a7.zip
Fix #3246
-rw-r--r--src/rlgl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 3756e5ac..9ca099ac 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -2945,6 +2945,7 @@ bool rlCheckRenderBatchLimit(int vCount)
unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount)
{
unsigned int id = 0;
+ if (data == NULL) return id;
glBindTexture(GL_TEXTURE_2D, 0); // Free any old binding