diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-13 19:18:06 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-13 19:19:47 +0900 |
commit | 8988b11a110ed004adbf44e7b655362ab6791c22 (patch) | |
tree | 38ceb34b882489492b571094864ceb3148c20014 | |
parent | 263c6c90d215e5a207409c8ea70aed45238c74b2 (diff) | |
download | tdegraphics-8988b11a110ed004adbf44e7b655362ab6791c22.tar.gz tdegraphics-8988b11a110ed004adbf44e7b655362ab6791c22.zip |
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 <michele.calgaro@yahoo.it>
-rw-r--r-- | kpdf/shell/shell.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp index 40df86dc..dd2adf2e 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<TDEToggleAction*>(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<TDEToggleAction*>(toolBarMenuAction()); + } return part; } |