瀏覽代碼

Update BitmapHandler.cpp

Nordsoft91 2 年之前
父節點
當前提交
640ebcdca4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mapeditor/BitmapHandler.cpp

+ 1 - 1
mapeditor/BitmapHandler.cpp

@@ -117,7 +117,7 @@ namespace BitmapHandler
 			{
 				logGlobal->error("Failed to open %s as H3 PCX!", fname);
 			}
-			return image;
+			return image.copy(); //copy must be returned here because buffer readFile.first used to build QImage will be cleaned after this line
 		}
 		else
 		{ //loading via QImage