Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-07-03 04:02:45 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-07-03 04:02:45 +0400
commit98a7ca61fa905792bd3fdfa6c29f44691c9582ac (patch)
tree47455f2482f6eca0352c10c57482641eec6afb57 /source/blender/imbuf/intern/allocimbuf.c
parent4e39a854b4589cddff484649d95cce4c71d4e9f4 (diff)
parent2ed69a95f499081aacc15c0295f3461c38430554 (diff)
Merged changes in the trunk up to revision 48505.
Diffstat (limited to 'source/blender/imbuf/intern/allocimbuf.c')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 319e3f27bd8..68a094c26d0 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -162,6 +162,8 @@ void IMB_freeImBuf(ImBuf *ibuf)
IMB_freezbuffloatImBuf(ibuf);
freeencodedbufferImBuf(ibuf);
IMB_metadata_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);
}
}
@@ -351,7 +353,7 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int
ibuf->planes = planes;
ibuf->ftype = TGA;
ibuf->channels = 4; /* float option, is set to other values when buffers get assigned */
- ibuf->ppm[0] = ibuf->ppm[1] = 150.0 / 0.0254; /* 150dpi -> pixels-per-meter */
+ ibuf->ppm[0] = ibuf->ppm[1] = IMB_DPI_DEFAULT / 0.0254; /* IMB_DPI_DEFAULT -> pixels-per-meter */
if (flags & IB_rect) {
if (imb_addrectImBuf(ibuf) == FALSE) {