diff options
author | George Hazan <ghazan@miranda.im> | 2020-11-10 21:15:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-11-10 21:15:53 +0300 |
commit | 22647d2a84ab1e568e06b9dfceed439cb3c073dd (patch) | |
tree | a1d29e13fa27cb2f001f62438db643538aa1da84 /protocols/IRCG/src | |
parent | f344c4d88e8ed5e2b1789ff5d40558e82dc09af8 (diff) |
IRC: fix for rare crash
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r-- | protocols/IRCG/src/options.cpp | 6 |
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;
|