From ea2da03e9b98e041e3ee19360d7a19e296d68784 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 13 May 2025 19:18:06 +0900 Subject: kpdf: fix SEGV described in issue #127. The crash only happens when building in debug mode. 'm_showToolBarActionr' needs to be created after the 'kpdf_part' has been created. Signed-off-by: Michele Calgaro (cherry picked from commit 8988b11a110ed004adbf44e7b655362ab6791c22) --- kpdf/shell/shell.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kpdf/shell/shell.cpp') diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp index b1f60bd7..dfa8a43c 100644 --- a/kpdf/shell/shell.cpp +++ b/kpdf/shell/shell.cpp @@ -105,7 +105,6 @@ void Shell::init() setupActions(); setupGUI(Keys | Save); - m_showToolBarAction = static_cast(toolBarMenuAction()); readSettings(); if (!TDEGlobal::config()->hasGroup("MainWindow")) @@ -384,6 +383,10 @@ KParts::ReadOnlyPart* Shell::createTab() part->widget()->show(); m_manager->addPart(part, true); + if (!m_showToolBarAction) + { + m_showToolBarAction = static_cast(toolBarMenuAction()); + } return part; } -- cgit v1.2.3