summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-16 18:21:50 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-16 18:21:50 +0300
commit05942467b37990f38fc80923f3d9ec63b160ad92 (patch)
tree3c6d3c3f55f83797d0a6444f1ddbd811267eb75d /src/gui
parentb6e4d73c64444efa7c7bd10f09926564457ac251 (diff)
downloadmanaplus-05942467b37990f38fc80923f3d9ec63b160ad92.tar.gz
manaplus-05942467b37990f38fc80923f3d9ec63b160ad92.tar.bz2
manaplus-05942467b37990f38fc80923f3d9ec63b160ad92.tar.xz
manaplus-05942467b37990f38fc80923f3d9ec63b160ad92.zip
Add missing checks.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/serverdialog.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 30b4e600e..035a98a10 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -531,9 +531,14 @@ void ServerDialog::loadServers(const bool addNew)
server.port = defaultPortForServerType(server.type);
}
}
- else if ((xmlNameEqual(subNode, "description")
- && server.description.empty()) || (!lang.empty()
- && xmlNameEqual(subNode, description2.c_str())))
+ else if (!subNode->xmlChildrenNode)
+ {
+ continue;
+ }
+
+ if ((xmlNameEqual(subNode, "description")
+ && server.description.empty()) || (!lang.empty()
+ && xmlNameEqual(subNode, description2.c_str())))
{
server.description = reinterpret_cast<const char*>(
subNode->xmlChildrenNode->content);