summaryrefslogtreecommitdiff
path: root/src/gui/windows/equipmentwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-24 14:55:44 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 20:06:07 +0300
commit9d521a19be347703bfdbb7802d0397a59c3edd7a (patch)
tree9a4e56edc84d5cfd8ebaea17fa19296c51e1e661 /src/gui/windows/equipmentwindow.cpp
parent841fe55e67ea467a8e2192dee5c169d282a35148 (diff)
downloadmv-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.gz
mv-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.bz2
mv-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.xz
mv-9d521a19be347703bfdbb7802d0397a59c3edd7a.zip
Add missing checks in windows.
Diffstat (limited to 'src/gui/windows/equipmentwindow.cpp')
-rw-r--r--src/gui/windows/equipmentwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 8e7d47f65..ef060ec83 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -672,6 +672,8 @@ void EquipmentWindow::addDefaultPage()
void EquipmentWindow::loadPage(const XmlNodePtr node)
{
+ if (!node)
+ return;
// TRANSLATORS: unknown equipment page name
const std::string &name = XML::langProperty(node, "name", _("Unknown"));
const int page = addPage(name);
@@ -698,6 +700,8 @@ void EquipmentWindow::loadSlot(const XmlNodePtr slotNode,
const ImageSet *const imageset,
const int page)
{
+ if (!imageset)
+ return;
const int slot = parseSlotName(XML::getProperty(slotNode, "name", ""));
if (slot < 0)
return;