diff options
author | George Hazan <george.hazan@gmail.com> | 2024-06-17 13:40:08 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-06-17 13:40:08 +0300 |
commit | 1923923f9c370f19491b347675a3a1d108bf7eac (patch) | |
tree | 04605bc4856e0f2ab07b813787a1408b378d72ce | |
parent | 238a095707c2e2f4c66334c58705a08497f02b5a (diff) |
fixes #4470 (Реакции: падение при попытке поставить пустую реакцию)
-rw-r--r-- | protocols/Telegram/src/menus.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Telegram/src/menus.cpp b/protocols/Telegram/src/menus.cpp index 0e15de32e4..acdbb6e54b 100644 --- a/protocols/Telegram/src/menus.cpp +++ b/protocols/Telegram/src/menus.cpp @@ -159,10 +159,10 @@ public: DB::EventInfo dbei(m_hEvent, false); __int64 msgId = ::dbei2id(dbei); - char *pszEmoji = (char *)cmbReactions.GetCurData(); - auto reaction = TD::make_object<TD::reactionTypeEmoji>(pszEmoji); - - m_proto->SendQuery(new TD::addMessageReaction(m_pUser->chatId, msgId, std::move(reaction), false, false)); + if (char *pszEmoji = (char *)cmbReactions.GetCurData()) { + auto reaction = TD::make_object<TD::reactionTypeEmoji>(pszEmoji); + m_proto->SendQuery(new TD::addMessageReaction(m_pUser->chatId, msgId, std::move(reaction), false, false)); + } return true; } }; |