diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-05-07 19:49:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-05-07 19:49:21 +0400 |
commit | d972b8488e5c2b119731bfbb2b0921cb7775064a (patch) | |
tree | 1f140a4baf20dd5406dbff56a5cef8de35d7da1a /source/blender/imbuf/intern/openexr | |
parent | 008863daec1249d1f17bc69e1105e336db690d63 (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.cpp | 8 |
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) { |