diff options
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 33555f0dbb5..e3c02736755 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -1560,7 +1560,6 @@ static ExrHandle *imb_exr_begin_read_mem(IStream &file_stream, MultiPartInputFil std::vector<MultiViewChannelName> channels; GetChannelsInMultiPartFile(*data->ifile, channels); - data->multiView = new StringVector(); imb_exr_get_views(*data->ifile, *data->multiView); for (size_t i = 0; i < channels.size(); i++) { @@ -2048,13 +2047,19 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem, size_t size, int flags, } } + /* file is no longer needed */ + delete membuf; + delete file; } } + else { + delete membuf; + delete file; + } + if (flags & IB_alphamode_detect) ibuf->flags |= IB_alphamode_premul; } - delete file; - delete membuf; return(ibuf); } catch (const std::exception& exc) |