浏览代码

Fixed crashes for Video with no content

Otger 10 年之前
父节点
当前提交
c876dce82b
共有 2 个文件被更改,包括 1 次插入2 次删除
  1. 1 1
      code/FBXConverter.cpp
  2. 0 1
      code/FBXDocument.h

+ 1 - 1
code/FBXConverter.cpp

@@ -1499,7 +1499,7 @@ private:
             path.Set(tex->RelativeFilename());
 
             const Video* media = tex->Media();
-            if(media != 0) {
+            if(media != 0 && media->ContentLength() > 0) {
                 unsigned int index;
 
                 VideoMap::const_iterator it = textures_converted.find(media);

+ 0 - 1
code/FBXDocument.h

@@ -701,7 +701,6 @@ public:
     uint8_t* RelinquishContent() {
         uint8_t* ptr = content;
         content = 0;
-        contentLength = 0;
         return ptr;
     }