summaryrefslogtreecommitdiffstats
path: root/kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-06-08 22:21:48 +0200
committer Eric Hameleers <alien@slackware.com>2020-06-08 22:21:48 +0200
commitf8cfd4d5a9d43258c318ebd663dfb7361a0524ad (patch)
treef2be6ad54652f74772094cd8b7538ab873db6723 /kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch
parente41c0c99c8d498cc2f3761eb35d4f5389a6d1798 (diff)
downloadktown-f8cfd4d5a9d43258c318ebd663dfb7361a0524ad.tar.gz
ktown-f8cfd4d5a9d43258c318ebd663dfb7361a0524ad.tar.xz
Patch konsole to fix segfaults
Diffstat (limited to '')
-rw-r--r--kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch b/kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch
new file mode 100644
index 0000000..914031b
--- /dev/null
+++ b/kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch
@@ -0,0 +1,58 @@
+From fdfae25665731882687da8721e58c3c56a3babf8 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Thu, 28 May 2020 09:28:06 -0400
+Subject: Fix crash when closing session in KonsolePart via menu
+
+This close method is also used when closing a Konsole session
+via the X on the tabbar and tabheader.
+
+FIXED-IN: 20.08.0
+BUG: 420817
+BUG: 420695
+BUG: 415762
+
+See merge request !87
+---
+ src/SessionController.cpp | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/src/SessionController.cpp b/src/SessionController.cpp
+index 006ba8b..e72f342 100644
+--- a/src/SessionController.cpp
++++ b/src/SessionController.cpp
+@@ -999,16 +999,23 @@ void SessionController::closeSession()
+ return;
+ }
+
+- if (confirmClose()) {
+- if (_session->closeInNormalWay()) {
++ if (!confirmClose()) {
++ return;
++ }
++
++ if (!_session->closeInNormalWay()) {
++ if (!confirmForceClose()) {
+ return;
+- } else if (confirmForceClose()) {
+- if (_session->closeInForceWay()) {
+- return;
+- } else {
+- qCDebug(KonsoleDebug) << "Konsole failed to close a session in any way.";
+- }
+ }
++
++ if (!_session->closeInForceWay()) {
++ qCDebug(KonsoleDebug) << "Konsole failed to close a session in any way.";
++ return;
++ }
++ }
++
++ if (factory()) {
++ factory()->removeClient(this);
+ }
+ }
+
+--
+cgit v1.1
+
+