diff --git a/gnome-text-editor.spec b/gnome-text-editor.spec index e2f7c0e..357e667 100644 --- a/gnome-text-editor.spec +++ b/gnome-text-editor.spec @@ -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 - 42.1.-2 +- Patch to fix session handling crash (RHBZ#2071116) + * Fri Apr 22 2022 David King - 42.1-1 - Update to 42.1 (#2077673) diff --git a/patch-session-ensure-task-is-always-completed.patch b/patch-session-ensure-task-is-always-completed.patch new file mode 100644 index 0000000..5fbd955 --- /dev/null +++ b/patch-session-ensure-task-is-always-completed.patch @@ -0,0 +1,29 @@ +From 7cf8457f0b56e1e48f0662bde8fc2ed079fb4d9b Mon Sep 17 00:00:00 2001 +From: Christian Hergert +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 +