瀏覽代碼

Fix double free in Video::~Video()

Maksim Kostin 1 年之前
父節點
當前提交
d311fa95c6
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      code/AssetLib/FBX/FBXMaterial.cpp

+ 3 - 1
code/AssetLib/FBX/FBXMaterial.cpp

@@ -367,7 +367,9 @@ Video::Video(uint64_t id, const Element &element, const Document &doc, const std
 }
 }
 
 
 Video::~Video() {
 Video::~Video() {
-    delete[] content;
+    if (contentLength > 0) {
+        delete[] content;
+    }
 }
 }
 
 
 } //!FBX
 } //!FBX