summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-11-10 21:15:53 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-11-10 21:15:53 +0300
commit22647d2a84ab1e568e06b9dfceed439cb3c073dd (patch)
treea1d29e13fa27cb2f001f62438db643538aa1da84 /protocols/IRCG/src
parentf344c4d88e8ed5e2b1789ff5d40558e82dc09af8 (diff)
IRC: fix for rare crash
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r--protocols/IRCG/src/options.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp
index 853cbd8048..727ffaaf34 100644
--- a/protocols/IRCG/src/options.cpp
+++ b/protocols/IRCG/src/options.cpp
@@ -123,7 +123,11 @@ static int sttServerEnum(const char* szSetting, void*)
SERVER_INFO *pData = new SERVER_INFO;
pData->m_name = mir_strdup(szSetting);
- char *p1 = strchr(dbv.pszVal, ':') + 1;
+ char *p1 = strchr(dbv.pszVal, ':');
+ if (p1 == nullptr)
+ return 0;
+
+ p1++;
pData->m_iSSL = 0;
if (!_strnicmp(p1, "SSL", 3)) {
p1 += 3;