From ac50119dd9e3872bf6861aabacf965b0a84aad2c Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 21 May 2015 16:46:49 +0300 Subject: [PATCH] version 0.8.17 crash fix --- Telegram/PrepareWin.bat | 6 +++--- Telegram/SourceFiles/application.cpp | 2 ++ Telegram/SourceFiles/config.h | 4 ++-- Telegram/SourceFiles/historywidget.cpp | 2 +- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | Bin 5540 -> 5540 bytes Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version.sh | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index bcb0bf9727..4082028aff 100644 --- a/Telegram/PrepareWin.bat +++ b/Telegram/PrepareWin.bat @@ -1,9 +1,9 @@ @echo OFF set "AppVersion=8016" -set "AppVersionStrSmall=0.8.16" -set "AppVersionStr=0.8.16" -set "AppVersionStrFull=0.8.16.0" +set "AppVersionStrSmall=0.8.17" +set "AppVersionStr=0.8.17" +set "AppVersionStrFull=0.8.17.0" set "DevChannel=0" if %DevChannel% neq 0 goto preparedev diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 67c4808c21..73afc1ee0d 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -666,6 +666,8 @@ void Application::checkMapVersion() { versionFeatures = QString::fromUtf8("\xe2\x80\x94 Video captions are displayed\n\xe2\x80\x94 Photo captions are displayed in photo viewer\n\xe2\x80\x94 Round corners for messages").replace('@', qsl("@") + QChar(0x200D)); } else if (!DevChannel && Local::oldMapVersion() < 8016) { versionFeatures = lang(lng_new_version_text).trimmed(); + } else if (!DevChannel && Local::oldMapVersion() < 8017) { + versionFeatures = lang(lng_new_version_minor).trimmed(); } if (!versionFeatures.isEmpty()) { versionFeatures = lng_new_version_wrap(lt_version, QString::fromStdWString(AppVersionStr), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog")); diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 4a2aa0637c..a49551dc18 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 8016; -static const wchar_t *AppVersionStr = L"0.8.16"; +static const int32 AppVersion = 8017; +static const wchar_t *AppVersionStr = L"0.8.17"; static const bool DevChannel = false; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index fa4dd17881..6faef6e6c9 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -701,7 +701,7 @@ void HistoryList::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _menu->addAction(lang(lng_context_reply_msg), historyWidget, SLOT(onReplyToMessage())); } if (item && !isUponSelected && !_contextMenuLnk) { - if (HistorySticker *sticker = dynamic_cast(msg->getMedia())) { + if (HistorySticker *sticker = dynamic_cast(msg ? msg->getMedia() : 0)) { DocumentData *doc = sticker->document(); if (doc && doc->sticker && doc->sticker->set.type() != mtpc_inputStickerSetEmpty) { if (!_menu) _menu = new ContextMenu(this); diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index eab1cc13a0..05f175be86 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.8.16 + 0.8.17 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 3f9a8ef15819d287b09fc7cdd238969e106ff455..a25e749e5b4b32022008f7a1ab04f6c2d663f735 100644 GIT binary patch delta 53 zcmZ3Yy+nIM5ig_p6O delta 53 zcmZ3Yy+nIM5ig_J