diff OrthancServer/Sources/ServerContext.cpp @ 4274:09ed936fd381

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Nov 2020 12:28:25 +0100
parents 0ae2ca210077
children 208029732d51
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp	Tue Nov 03 12:24:50 2020 +0100
+++ b/OrthancServer/Sources/ServerContext.cpp	Tue Nov 03 12:28:25 2020 +0100
@@ -1441,11 +1441,11 @@
     {
       // Use Orthanc's built-in decoder, using the cache to speed-up
       // things on multi-frame images
-      ServerContext::DicomCacheLocker locker(*this, publicId);
 
       std::unique_ptr<ImageAccessor> decoded;
       try
       {
+        ServerContext::DicomCacheLocker locker(*this, publicId);
         decoded.reset(locker.GetDicom().DecodeFrame(frameIndex));
       }
       catch (OrthancException& e)