From 0dcb8748220b2d4eeacfe16a9962d538b62c027e Mon Sep 17 00:00:00 2001 From: Cekis Date: Mon, 7 Dec 2015 22:58:43 +0100 Subject: [PATCH] Fixed issue with appearance templates --- .../src/shared/appearance/AppearanceTemplateList.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/shared/library/sharedObject/src/shared/appearance/AppearanceTemplateList.cpp b/engine/shared/library/sharedObject/src/shared/appearance/AppearanceTemplateList.cpp index 869f85b2..8661b1b2 100755 --- a/engine/shared/library/sharedObject/src/shared/appearance/AppearanceTemplateList.cpp +++ b/engine/shared/library/sharedObject/src/shared/appearance/AppearanceTemplateList.cpp @@ -396,6 +396,11 @@ Appearance *AppearanceTemplateList::createAppearance(const char *const fileName) //-- get the appearance template const AppearanceTemplate *const appearanceTemplate = fetch(fileName); + if(!appearanceTemplate){ + DEBUG_WARNING(true, ("FIX ME: Appearance template for %s could not be fetched - is it missing?", fileName)); + return NULL; // Cekis: TODO: Figure out why the template can't be fetched. + } + //-- creating the appearance will increment the reference count Appearance *const appearance = appearanceTemplate->createAppearance();