REVIEWED: Data types validation

This commit is contained in:
Ray 2023-03-07 20:33:45 +01:00
commit ab1e246367

View file

@ -3362,7 +3362,9 @@ void UnloadTexture(Texture2D texture)
// Check if a render texture is ready
bool IsRenderTextureReady(RenderTexture2D target)
{
return target.id > 0 && IsTextureReady(target.depth) && IsTextureReady(target.texture);
return ((target.id > 0) && // Validate OpenGL id
IsTextureReady(target.depth) && // Validate FBO depth texture/renderbuffer
IsTextureReady(target.texture)); // Validate FBO texture
}
// Unload render texture from GPU memory (VRAM)