diff --git a/src/blockfile/ODPCMAliasBlockFile.cpp b/src/blockfile/ODPCMAliasBlockFile.cpp index 44d057c3f..c90440319 100644 --- a/src/blockfile/ODPCMAliasBlockFile.cpp +++ b/src/blockfile/ODPCMAliasBlockFile.cpp @@ -348,10 +348,9 @@ bool ODPCMAliasBlockFile::IsSummaryAvailable() const ///Calls write summary, and makes sure it is only done once in a thread-safe fashion. void ODPCMAliasBlockFile::DoWriteSummary() { - mWriteSummaryMutex.Lock(); + ODLocker locker { &mWriteSummaryMutex }; if(!IsSummaryAvailable()) WriteSummary(); - mWriteSummaryMutex.Unlock(); } ///sets the file name the summary info will be saved in. threadsafe.