From 3dd485e0ebced5f5cde983e13d4992fa2577266c Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 10 Apr 2020 19:42:14 -1000 Subject: [PATCH] Fix MP3 PASS extract with null textures --- DataSpec/DNAMP3/CMDLMaterials.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DataSpec/DNAMP3/CMDLMaterials.cpp b/DataSpec/DNAMP3/CMDLMaterials.cpp index e2ff1c8ae..f12848b14 100644 --- a/DataSpec/DNAMP3/CMDLMaterials.cpp +++ b/DataSpec/DNAMP3/CMDLMaterials.cpp @@ -46,6 +46,10 @@ void MaterialSet::RegisterMaterialProps(Stream& out) { static void LoadTexture(Stream& out, const UniqueID64& tex, const PAKRouter& pakRouter, const PAK::Entry& entry) { + if (!tex.isValid()) { + out << "image = None\n"; + return; + } std::string texName = pakRouter.getBestEntryName(tex); const nod::Node* node; const typename PAKRouter::EntryType* texEntry = pakRouter.lookupEntry(tex, &node);