diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index ed41c4d3f..198edfa10 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1954,7 +1954,8 @@ void HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) { requestMessageData(_editMsgId); } } else if (!readyToForward()) { - _processingReplyId = _history->localDraft({})->msgId; + const auto draft = _history->localDraft({}); + _processingReplyId = draft ? draft->msgId : MsgId(); processReply(); } } diff --git a/Telegram/SourceFiles/storage/storage_account.cpp b/Telegram/SourceFiles/storage/storage_account.cpp index 4c845ea21..c2fea1afe 100644 --- a/Telegram/SourceFiles/storage/storage_account.cpp +++ b/Telegram/SourceFiles/storage/storage_account.cpp @@ -1363,8 +1363,8 @@ void Account::readDraftsWithCursors(not_null history) { for (auto i = 0; i != count; ++i) { TextWithTags data; QByteArray tagsSerialized; - qint64 keyValue = 0; - qint32 keyValueOld = 0, messageId = 0, uncheckedPreviewState = 0; + qint64 keyValue = 0, messageId = 0; + qint32 keyValueOld = 0, uncheckedPreviewState = 0; if (keysOld) { draft.stream >> keyValueOld; } else {