From f90019bc1ee8a6283dff09dc02977aff42fee1bb Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Tue, 7 Nov 2017 19:38:31 +0200 Subject: [PATCH] NFF: Add assertions to silence static analyzer warnings --- code/NFFLoader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/NFFLoader.cpp b/code/NFFLoader.cpp index 396fb28bf..a51c500f1 100644 --- a/code/NFFLoader.cpp +++ b/code/NFFLoader.cpp @@ -1079,6 +1079,7 @@ void NFFImporter::InternReadFile( const std::string& pFile, // generate the camera if (hasCam) { + ai_assert(ppcChildren); aiNode* nd = new aiNode(); *ppcChildren = nd; nd->mName.Set(""); @@ -1104,6 +1105,7 @@ void NFFImporter::InternReadFile( const std::string& pFile, // generate light sources if (!lights.empty()) { + ai_assert(ppcChildren); pScene->mNumLights = (unsigned int)lights.size(); pScene->mLights = new aiLight*[pScene->mNumLights]; for (unsigned int i = 0; i < pScene->mNumLights;++i,++ppcChildren)