summaryrefslogtreecommitdiffhomepage
path: root/Stars45/ShipDesign.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/ShipDesign.cpp')
-rw-r--r--Stars45/ShipDesign.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Stars45/ShipDesign.cpp b/Stars45/ShipDesign.cpp
index 9965d3d..92a5c30 100644
--- a/Stars45/ShipDesign.cpp
+++ b/Stars45/ShipDesign.cpp
@@ -3590,6 +3590,8 @@ void
ShipDesign::ParseSkinMtl(TermStruct* val, Skin* skin)
{
Material* mtl = new(__FILE__,__LINE__) Material;
+ if (mtl == nullptr)
+ return;
for (int i = 0; i < val->elements()->size(); i++) {
TermDef* def = val->elements()->at(i)->isDef();
@@ -3675,6 +3677,7 @@ ShipDesign::ParseSkinMtl(TermStruct* val, Skin* skin)
Print("WARNING: invalid or missing tex_emissive in '%s'\n", filename);
DataLoader* loader = DataLoader::GetLoader();
+
loader->LoadTexture(tex_name, mtl->tex_emissive);
}
}