Fix MP3 PASS extract with null textures

This commit is contained in:
Jack Andersen 2020-04-10 19:42:14 -10:00
parent 330103d936
commit 3dd485e0eb
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,10 @@ void MaterialSet::RegisterMaterialProps(Stream& out) {
static void LoadTexture(Stream& out, const UniqueID64& tex,
const PAKRouter<PAKBridge>& 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<PAKBridge>::EntryType* texEntry = pakRouter.lookupEntry(tex, &node);