svn merge ^/trunk/blender -r48415:48469
[blender.git] / source / blender / imbuf / intern / allocimbuf.c
index e355683b065550952a7747067570bc0e261f8192..0545bb33cb3d209589a7db30003e0ddb5cd91be6 100644 (file)
@@ -165,6 +165,10 @@ void IMB_freeImBuf(ImBuf *ibuf)
                        IMB_metadata_free(ibuf);
                        IMB_colormanage_flags_free(ibuf);
                        IMB_colormanage_cache_data_free(ibuf);
+
+                       if (ibuf->dds_data.data != NULL) {
+                               free(ibuf->dds_data.data); /* dds_data.data is allocated by DirectDrawSurface::readData(), so don't use MEM_freeN! */
+                       }
                        MEM_freeN(ibuf);
                }
        }