diff --git a/src/lib/OpenEXR/ImfScanLineInputFile.cpp b/src/lib/OpenEXR/ImfScanLineInputFile.cpp index e3c7bdde79..066b05e107 100644 --- a/src/lib/OpenEXR/ImfScanLineInputFile.cpp +++ b/src/lib/OpenEXR/ImfScanLineInputFile.cpp @@ -503,6 +503,7 @@ void ScanLineInputFile::Data::readPixels ( //////////////////////////////////////// +#if ILMTHREAD_THREADING_ENABLED void ScanLineInputFile::Data::LineBufferTask::execute () { try @@ -517,12 +518,11 @@ void ScanLineInputFile::Data::LineBufferTask::execute () } catch (std::exception &e) { -#if ILMTHREAD_THREADING_ENABLED std::lock_guard lock (_ifd->_mx); -#endif _ifd->_failures.emplace_back (std::string (e.what())); } } +#endif ////////////////////////////////////////