summaryrefslogtreecommitdiff
path: root/protocols/MinecraftDynmap/src
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-05-31 09:40:01 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-05-31 09:40:01 +0000
commitc8e2e90a1acac55b97a8dd6c009483c2987bdf6c (patch)
tree365aae097c927887841d53b3fd5ca5b53864b762 /protocols/MinecraftDynmap/src
parent20b3aa85fb31018607a888fb232f58b98851ad3b (diff)
Minecraft Dynmap:
- Fixed crash without server name (fixes #935) git-svn-id: http://svn.miranda-ng.org/main/trunk@13930 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MinecraftDynmap/src')
-rw-r--r--protocols/MinecraftDynmap/src/communication.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/MinecraftDynmap/src/communication.cpp b/protocols/MinecraftDynmap/src/communication.cpp
index 98b0728483..4845d6899c 100644
--- a/protocols/MinecraftDynmap/src/communication.cpp
+++ b/protocols/MinecraftDynmap/src/communication.cpp
@@ -356,13 +356,13 @@ void MinecraftDynmapProto::SignOnWorker(void*)
int old_status = m_iStatus;
// Load server from database
- m_server = ptrA(db_get_sa(NULL, m_szModuleName, MINECRAFTDYNMAP_KEY_SERVER));
-
- if (m_server.empty()) {
+ ptrA str(db_get_sa(NULL, m_szModuleName, MINECRAFTDYNMAP_KEY_SERVER));
+ if ((str== NULL) || *str==NULL) {
MessageBox(NULL, TranslateT("Set server address to connect."), m_tszUserName, MB_OK);
SetStatus(ID_STATUS_OFFLINE);
return;
}
+ m_server = str;
// Fix format of given server
if (m_server.substr(0, 7) != "http://" && m_server.substr(0, 8) != "https://")