2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

added some checks

This commit is contained in:
John Preston
2015-10-03 14:33:51 +03:00
parent e3e774176e
commit 605b18aa27
12 changed files with 39 additions and 29 deletions

View File

@@ -6963,7 +6963,7 @@ HistoryReply::HistoryReply(History *history, HistoryBlock *block, const MTPDmess
, replyToVersion(0)
, _maxReplyWidth(0)
{
if (!updateReplyTo()) {
if (!updateReplyTo() && App::api()) {
App::api()->requestReplyTo(this, history->peer->asChannel(), replyToMsgId);
}
}
@@ -6974,7 +6974,7 @@ HistoryReply::HistoryReply(History *history, HistoryBlock *block, MsgId msgId, i
, replyToVersion(0)
, _maxReplyWidth(0)
{
if (!updateReplyTo()) {
if (!updateReplyTo() && App::api()) {
App::api()->requestReplyTo(this, history->peer->asChannel(), replyToMsgId);
}
}
@@ -7285,7 +7285,7 @@ void HistoryReply::getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, i
HistoryReply::~HistoryReply() {
if (replyToMsg) {
App::historyUnregReply(this, replyToMsg);
} else if (replyToMsgId) {
} else if (replyToMsgId && App::api()) {
App::api()->itemRemoved(this);
}
}