[rkward] /: Fix hang when opening empty workplace, and associated crash on exit.
Thomas Friedrichsmeier
null at kde.org
Sat May 2 10:35:21 BST 2020
Git commit 7dc28480fe742396a4e1f0758b763ce80d932e1d by Thomas Friedrichsmeier.
Committed on 02/05/2020 at 09:34.
Pushed by tfry into branch 'master'.
Fix hang when opening empty workplace, and associated crash on exit.
BUG: 420888
M +1 -0 ChangeLog
M +1 -0 rkward/rkward.cpp
M +1 -1 rkward/windows/rkworkplaceview.cpp
https://commits.kde.org/rkward/7dc28480fe742396a4e1f0758b763ce80d932e1d
diff --git a/ChangeLog b/ChangeLog
index 0523f960..c66aa676 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
--- Version 0.7.2 - UNRELEASED
+- Fixed: Hang when opening an empty workplace
- Fixed: Crash when mousing over code preview window with focus-follows-mouse enabled
- Add menu action to open any supported file type, directly
- Support using QWebEngine instead of QtWebKit (still supported)
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index d6b51556..7bae19a3 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -658,6 +658,7 @@ void RKWardMainWindow::partChanged (KParts::Part *part) {
RK_TRACE (APP);
if (gui_rebuild_locked) return;
+ if (!part) return;
createGUI (part);
if (!guiFactory ()) {
diff --git a/rkward/windows/rkworkplaceview.cpp b/rkward/windows/rkworkplaceview.cpp
index 2200f5da..3168e23d 100644
--- a/rkward/windows/rkworkplaceview.cpp
+++ b/rkward/windows/rkworkplaceview.cpp
@@ -586,7 +586,7 @@ void RKWorkplaceView::purgeEmptyPanes () {
newpane = 0; // just in case of broken specifications during workplace restoration
for (int i = 0; i < panes.count (); ++i) {
- if (panes[i]->count () < 1) {
+ if (panes.count() > 1 && panes[i]->count() < 1) {
purgePane (panes[i]);
--i;
}
More information about the rkward-tracker
mailing list