Delete shader in case compilation fails

This commit is contained in:
Ray
2025-06-22 23:52:34 +02:00
parent 1abac023bd
commit b677376088

View File

@@ -4178,6 +4178,9 @@ unsigned int rlCompileShader(const char *shaderCode, int type)
RL_FREE(log);
}
// Unload object allocated by glCreateShader(),
// despite failing in the compilation process
glDeleteShader(shader);
shader = 0;
}
else