From 1828b14cda7626d8d53f65f2c7d4da84a6955ec9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 15 Mar 2016 21:08:17 +0300 Subject: [PATCH] checking auth in onViewsIncrement --- Telegram/SourceFiles/mainwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index a6058b3aec..f8c8d7b747 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2166,6 +2166,8 @@ void MainWidget::scheduleViewIncrement(HistoryItem *item) { } void MainWidget::onViewsIncrement() { + if (!App::main() || !MTP::authedId()) return; + for (ViewsIncrement::iterator i = _viewsToIncrement.begin(); i != _viewsToIncrement.cend();) { if (_viewsIncrementRequests.contains(i.key())) { ++i;