diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-10 11:59:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-10 11:59:44 +0300 |
commit | 33733576589076f080ddfa000b899843016a2597 (patch) | |
tree | 14b7ce9e4726fb230b22fa74e9f3e3b6b65e49f1 /protocols/Telegram/src/server.cpp | |
parent | dd914976e8eb566403056c8566941a391813868f (diff) |
crash fix
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r-- | protocols/Telegram/src/server.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index 59da2a3c9f..bbe86146e7 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -209,6 +209,9 @@ int CTelegramProto::SendTextMessage(int64_t chatId, const char *pszMessage) void CTelegramProto::SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER pHandler)
{
+ if (!m_pClientMmanager)
+ return;
+
int queryId = ++m_iQueryId;
auto szDescr = to_string(*pFunc);
@@ -222,6 +225,9 @@ void CTelegramProto::SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER pHandler) void CTelegramProto::SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER_FULL pHandler, void *pUserInfo)
{
+ if (!m_pClientMmanager)
+ return;
+
int queryId = ++m_iQueryId;
auto szDescr = to_string(*pFunc);
|