commit 939bff7a4425782cd7e3cad9c394e293add45c33
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Tue Feb 9 14:03:54 2021 +0100
Packported upstream patch with crash fixes.
telegram-desktop-crash-fixes.patch | 32 ++++++++++++++++++++++++++++++++
telegram-desktop.spec | 14 +++++++-------
2 files changed, 39 insertions(+), 7 deletions(-)
---
diff --git a/telegram-desktop-crash-fixes.patch b/telegram-desktop-crash-fixes.patch
new file mode 100644
index 0000000..093d96d
--- /dev/null
+++ b/telegram-desktop-crash-fixes.patch
@@ -0,0 +1,32 @@
+From 03e8d28456fbcb6f639ecf4e0d45491612052386 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010(a)ya.ru>
+Date: Tue, 9 Feb 2021 15:26:33 +0400
+Subject: [PATCH] Check for null manager type
+
+---
+ .../platform/linux/notifications_manager_linux.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
+index 7afdd560c71..eb7ca59e549 100644
+--- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
++++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
+@@ -722,13 +722,13 @@ void Create(Window::Notifications::System *system) {
+ using ManagerType = Window::Notifications::ManagerType;
+ if ((Core::App().settings().nativeNotifications() && Supported())
+ || Enforced()) {
+- if (*system->managerType() != ManagerType::Native) {
++ if (!system->managerType().has_value()
++ || *system->managerType() != ManagerType::Native) {
+ system->setManager(std::make_unique<Manager>(system));
+ }
+- } else {
+- if (*system->managerType() != ManagerType::Default) {
+- system->setManager(nullptr);
+- }
++ } else if (!system->managerType().has_value()
++ || *system->managerType() != ManagerType::Default) {
++ system->setManager(nullptr);
+ }
+ };
+
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index e0585de..fc15bb9 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -26,7 +26,7 @@
Name: telegram-desktop
Version: 2.5.8
-Release: 2%{?dist}
+Release: 3%{?dist}
# Application and 3rd-party modules licensing:
# * Telegram Desktop - GPLv3+ with OpenSSL exception -- main tarball;
@@ -37,6 +37,9 @@ URL:
https://github.com/telegramdesktop/%{appname}
Summary: Telegram Desktop official messaging app
Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}-full.tar.gz
+#
https://github.com/telegramdesktop/tdesktop/pull/10336
+Patch100: %{name}-crash-fixes.patch
+
# Telegram Desktop require more than 8 GB of RAM on linking stage.
# Disabling all low-memory architectures.
ExclusiveArch: x86_64
@@ -213,14 +216,11 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/%{launcher}.desktop
%{_metainfodir}/%{launcher}.appdata.xml
%changelog
+* Tue Feb 09 2021 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.5.8-3
+- Packported upstream patch with crash fixes.
+
* Thu Feb 04 2021 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.5.8-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Feb 01 2021 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.5.8-1
- Updated to version 2.5.8.
-
-* Fri Jan 01 2021 Leigh Scott <leigh123linux(a)gmail.com> - 2.5.1-2
-- Rebuilt for new ffmpeg snapshot
-
-* Wed Dec 23 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.5.1-1
-- Updated to version 2.5.1.