From 856d402b59725b99b9af21e3831c8cdb33383989 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Tue, 7 Nov 2017 18:44:16 +0200 Subject: [PATCH] AMFImporter: Add assertion to silence a static analyzer warning --- code/AMFImporter_Postprocess.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/AMFImporter_Postprocess.cpp b/code/AMFImporter_Postprocess.cpp index 3737116f2..991eb97e7 100644 --- a/code/AMFImporter_Postprocess.cpp +++ b/code/AMFImporter_Postprocess.cpp @@ -282,7 +282,9 @@ size_t AMFImporter::PostprocessHelper_GetTextureID_Or_Create(const std::string& if(!pID.empty()) { for(size_t idx_target = pOffset, idx_src = 0; idx_target < tex_size; idx_target += pStep, idx_src++) { - converted_texture.Data[idx_target] = src_texture[pSrcTexNum]->Data.at(idx_src); + CAMFImporter_NodeElement_Texture* tex = src_texture[pSrcTexNum]; + ai_assert(tex); + converted_texture.Data[idx_target] = tex->Data.at(idx_src); } } };// auto CopyTextureData = [&](const size_t pOffset, const size_t pStep, const uint8_t pSrcTexNum) -> void