We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4196674 commit 415f2c0Copy full SHA for 415f2c0
source/core/support/imageutil.cpp
@@ -1387,14 +1387,11 @@ ImageData *Copy_Image(ImageData *Old)
1387
1388
void Destroy_Image(ImageData *image)
1389
{
1390
- return;
1391
-
1392
- // Images are now cached
1393
1394
- // if ((image == nullptr) || (--(image->References) > 0))
1395
- // return;
1396
- //
1397
- // delete image;
+ if ((image == nullptr) || (--(image->References) > 0))
+ return;
+
+ image->data = nullptr; // Prevent the image from being deleted. Images are now cached.
+ delete image;
1398
}
1399
1400
void Remove_Cached_Image(Image* image) {
0 commit comments