Ver Fonte

Merge pull request #2464 from muxanickms/topic/exception_spam_fix_fbxmaterial

Exception spam fix for FBXMaterial
Kim Kulling há 6 anos atrás
pai
commit
b4eb974d9e
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      code/FBXMaterial.cpp

+ 1 - 1
code/FBXMaterial.cpp

@@ -316,7 +316,7 @@ Video::Video(uint64_t id, const Element& element, const Document& doc, const std
         relativeFileName = ParseTokenAsString(GetRequiredToken(*RelativeFilename,0));
         relativeFileName = ParseTokenAsString(GetRequiredToken(*RelativeFilename,0));
     }
     }
 
 
-    if(Content) {
+    if(Content && !Content->Tokens().empty()) {
         //this field is omitted when the embedded texture is already loaded, let's ignore if it's not found
         //this field is omitted when the embedded texture is already loaded, let's ignore if it's not found
         try {
         try {
             const Token& token = GetRequiredToken(*Content, 0);
             const Token& token = GetRequiredToken(*Content, 0);