Quellcode durchsuchen

Update glTF2Asset.inl

fix VS-compiler warning.
Kim Kulling vor 5 Jahren
Ursprung
Commit
f71b332ed1
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      code/glTF2/glTF2Asset.inl

+ 2 - 1
code/glTF2/glTF2Asset.inl

@@ -1035,7 +1035,8 @@ inline void Mesh::Read(Value &pJSON_Object, Asset &pAsset_Root) {
         }
     }
 
-    if (Value* extras = FindObject(pJSON_Object, "extras")) {
+    Value *extras = FindObject(pJSON_Object, "extras");
+    if (nullptr != extras ) {
         if (Value* curTargetNames = FindArray(*extras, "targetNames")) {
             this->targetNames.resize(curTargetNames->Size());
             for (unsigned int i = 0; i < curTargetNames->Size(); ++i) {