diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 1583d271aa5..05ff1c44aab 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -162,10 +162,10 @@ class IMMapStream : public Imf::IStream { imb_mmap_lock(); _mmap_file = BLI_mmap_open(file); imb_mmap_unlock(); + close(file); if (_mmap_file == nullptr) { throw IEX_NAMESPACE::InputExc("BLI_mmap_open failed"); } - close(file); _exrbuf = (uchar *)BLI_mmap_get_pointer(_mmap_file); }