浏览代码

Is zlib thread-safe...?

Michał W. Urbańczyk 15 年之前
父节点
当前提交
e717f2fd05
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hch/CLodHandler.cpp

+ 1 - 1
hch/CLodHandler.cpp

@@ -110,9 +110,9 @@ unsigned char * CLodHandler::giveFile(std::string defName, int * length)
 
 		LOD.seekg(ourEntry->offset, std::ios::beg);
 		LOD.read((char*)outp, ourEntry->size);
-		mutex->unlock();
 		unsigned char * decomp = NULL;
 		infs2(outp, ourEntry->size, ourEntry->realSize, decomp);
+		mutex->unlock();
 		delete[] outp;
 		return decomp;
 	}