Update glTF2Asset.inl

Fix possible nullptr-dereferencing.
pull/2243/head
Kim Kulling 2018-11-27 20:18:00 +01:00 committed by GitHub
parent d44e25350f
commit 657014dff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -1359,10 +1359,12 @@ inline void Asset::Load(const std::string& pFile, bool isBinary)
// Force reading of skins since they're not always directly referenced
if (Value* skinsArray = FindArray(doc, "skins")) {
if ( nullptr != skinsArray ) {
for (unsigned int i = 0; i < skinsArray->Size(); ++i) {
skins.Retrieve(i);
}
}
}
if (Value* animsArray = FindArray(doc, "animations")) {
for (unsigned int i = 0; i < animsArray->Size(); ++i) {