summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-03 11:37:44 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-03 11:37:44 +0300
commitd6696d3b5dcc38b8562063379cb524d157892d5f (patch)
tree5e7c827dd6b81e20f22717de497e844451df9e21 /protocols
parent11c1fd1cc2473055dcd9161319d258084e122fcd (diff)
Telegram: fix for an occasional crash
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Telegram/src/server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 181631f4cc..bb92d2af7d 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -46,7 +46,9 @@ void __cdecl CTelegramProto::ServerThread(void *)
proxyType = TD::make_object<TD::proxyTypeHttp>();
break;
}
- SendQuery(new TD::addProxy(nluSettings.szProxyServer, nluSettings.wProxyPort, true, std::move(proxyType)));
+
+ if (proxyType)
+ SendQuery(new TD::addProxy(nluSettings.szProxyServer, nluSettings.wProxyPort, true, std::move(proxyType)));
}
while (!m_bTerminated) {