From 22647d2a84ab1e568e06b9dfceed439cb3c073dd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 10 Nov 2020 21:15:53 +0300 Subject: IRC: fix for rare crash --- protocols/IRCG/src/options.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/IRCG/src') 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; -- cgit v1.2.3