summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/menus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src/menus.cpp')
-rw-r--r--protocols/Telegram/src/menus.cpp8
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;
}
};