Fix #116432: Crash when changing source of image node

Blender crashes when changing the source of the image node to Generated
then to something else, then making any changes to the image. This is
just due to a nullptr GPU texture.

This is because Blender resets the path of the image when changed to
Generated source.
This commit is contained in:
Omar Emara 2023-12-21 20:20:37 +02:00
parent 802ac5ba5a
commit 9bbe81b630
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ CachedImage::CachedImage(Context &context,
CachedImage::~CachedImage()
{
GPU_texture_free(texture_);
GPU_TEXTURE_FREE_SAFE(texture_);
}
GPUTexture *CachedImage::texture()