mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-04 17:06:27 +00:00
REVIEWED: UnloadRenderTexture()
, additional check
This commit is contained in:
@@ -3793,8 +3793,11 @@ void UnloadRenderTexture(RenderTexture2D target)
|
||||
{
|
||||
if (target.id > 0)
|
||||
{
|
||||
// Color texture attached to FBO is deleted
|
||||
rlUnloadTexture(target.texture.id);
|
||||
if (target.texture.id > 0)
|
||||
{
|
||||
// Color texture attached to FBO is deleted
|
||||
rlUnloadTexture(target.texture.id);
|
||||
}
|
||||
|
||||
// NOTE: Depth texture/renderbuffer is automatically
|
||||
// queried and deleted before deleting framebuffer
|
||||
|
Reference in New Issue
Block a user