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-14 10:50:54 +0900 |
| commit | ea2da03e9b98e041e3ee19360d7a19e296d68784 (patch) | |
| tree | 72c3edf3056c743abfb57a2a39ac742eaede0bfb | |
| parent | 7735a26b44fe1496cccb233b3cd0eb332e20bba0 (diff) | |
| download | tdegraphics-ea2da03e9b98e041e3ee19360d7a19e296d68784.tar.gz tdegraphics-ea2da03e9b98e041e3ee19360d7a19e296d68784.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>
(cherry picked from commit 8988b11a110ed004adbf44e7b655362ab6791c22)
| -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 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<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; } |
