From 05942467b37990f38fc80923f3d9ec63b160ad92 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 16 Oct 2014 18:21:50 +0300 Subject: Add missing checks. --- src/gui/windows/serverdialog.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/gui/windows') 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( subNode->xmlChildrenNode->content); -- cgit v1.2.3-70-g09d2