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:
authorCampbell Barton <ideasman42@gmail.com>2010-05-07 19:49:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-05-07 19:49:21 +0400
commitd972b8488e5c2b119731bfbb2b0921cb7775064a (patch)
tree1f140a4baf20dd5406dbff56a5cef8de35d7da1a /source/blender/imbuf/intern/openexr
parent008863daec1249d1f17bc69e1105e336db690d63 (diff)
fix for segfault when reading bad multilayer EXR's
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 72d2dd01ffe..214cccd77c3 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1015,9 +1015,13 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, int size, int flags)
}
delete file;
-
+ if(ibuf) {
+ if(ibuf->rect_float) {
+ MEM_freeN(ibuf->rect_float);
+ ibuf->rect_float= NULL;
+ }
+ }
return(ibuf);
-
}
catch (const std::exception &exc)
{