From edc6ce053eafbaaa55fcf7728e449d9e458a1ddc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 5 Jan 2015 21:35:35 +0300 Subject: Add missing check for null pointer. --- src/resources/db/npcdb.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/resources/db') diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp index 0db5bedc6..3048fb317 100644 --- a/src/resources/db/npcdb.cpp +++ b/src/resources/db/npcdb.cpp @@ -125,6 +125,9 @@ void NPCDB::loadXmlFile(const std::string &fileName) } else if (xmlNameEqual(spriteNode, "particlefx")) { + if (!spriteNode->xmlChildrenNode) + continue; + display.particles.push_back(reinterpret_cast( spriteNode->xmlChildrenNode->content)); } -- cgit v1.2.3-70-g09d2