diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-16 18:21:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-16 18:21:50 +0300 |
commit | 05942467b37990f38fc80923f3d9ec63b160ad92 (patch) | |
tree | 3c6d3c3f55f83797d0a6444f1ddbd811267eb75d /src/gui/windows/serverdialog.cpp | |
parent | b6e4d73c64444efa7c7bd10f09926564457ac251 (diff) | |
download | plus-05942467b37990f38fc80923f3d9ec63b160ad92.tar.gz plus-05942467b37990f38fc80923f3d9ec63b160ad92.tar.bz2 plus-05942467b37990f38fc80923f3d9ec63b160ad92.tar.xz plus-05942467b37990f38fc80923f3d9ec63b160ad92.zip |
Add missing checks.
Diffstat (limited to 'src/gui/windows/serverdialog.cpp')
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 11 |
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); |