Patch to fix session handling crash

Resolves: RHBZ#2071116
This commit is contained in:
Link Dupont 2022-05-27 09:19:20 -04:00
parent 8d1a779a0b
commit 67d2f3bb9e
2 changed files with 35 additions and 1 deletions

View File

@ -7,13 +7,15 @@
Name: gnome-text-editor
Version: 42.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A simple text editor for the GNOME desktop
License: GPLv3+
URL: https://gitlab.gnome.org/GNOME/gnome-text-editor
Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{tarball_version}.tar.xz
Patch0: patch-session-ensure-task-is-always-completed.patch
BuildRequires: pkgconfig(enchant-2) >= %{enchant_version}
BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gtk4) >= %{gtk4_version}
@ -72,6 +74,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.TextEditor.
%changelog
* Fri May 27 2022 Link Dupont <link@sub-pop.net> - 42.1.-2
- Patch to fix session handling crash (RHBZ#2071116)
* Fri Apr 22 2022 David King <amigadave@amigadave.com> - 42.1-1
- Update to 42.1 (#2077673)

View File

@ -0,0 +1,29 @@
From 7cf8457f0b56e1e48f0662bde8fc2ed079fb4d9b Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Fri, 13 May 2022 14:32:12 -0700
Subject: [PATCH] session: ensure task is always completed
This can happen if org.gnome.desktop.privacy remember-recent-files is set
to false, causing a segfault at shutdown when persisting the session back
to disk.
Fixes #371
---
src/editor-session.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/editor-session.c b/src/editor-session.c
index 44d3bf2..466da42 100644
--- a/src/editor-session.c
+++ b/src/editor-session.c
@@ -1103,6 +1103,7 @@ editor_session_update_recent_worker (GTask *task,
/* Just delete recent files if the user doesn't want them */
g_autofree gchar *path = get_bookmarks_filename ();
g_unlink (path);
+ g_task_return_boolean (task, TRUE);
return;
}
--
GitLab