diff --git a/main/src/CaelumScriptTranslator.cpp b/main/src/CaelumScriptTranslator.cpp index c66b052..f58c524 100644 --- a/main/src/CaelumScriptTranslator.cpp +++ b/main/src/CaelumScriptTranslator.cpp @@ -407,7 +407,9 @@ namespace Caelum // "Caelum: Saved " + objNode->cls + " name " + objNode->name + " as a resource"); PropScriptResourceManager* mgr = this->getResourceManager (); ResourcePtr resource = mgr->createResource (objNode->name, compiler->getResourceGroup()); - resource->_notifyOrigin (objNode->file); + if (resource) { + resource->_notifyOrigin (objNode->file); + } return; }