mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
Do not crash if the part could not be found
This commit is contained in:
parent
933ef384d7
commit
328efbc562
|
@ -69,6 +69,7 @@ void Shell::init()
|
|||
setXMLFile("shell.rc");
|
||||
m_doc=0L;
|
||||
m_fileformatsscanned = false;
|
||||
m_showMenuBarAction = 0;
|
||||
// this routine will find and load our Part. it finds the Part by
|
||||
// name which is a bad idea usually.. but it's alright in this
|
||||
// case since our Part is made for this Shell
|
||||
|
@ -285,7 +286,8 @@ void Shell::setFullScreen( bool useFullScreen )
|
|||
|
||||
void Shell::showEvent(QShowEvent *e)
|
||||
{
|
||||
m_showMenuBarAction->setChecked( menuBar()->isVisible() );
|
||||
if (m_showMenuBarAction)
|
||||
m_showMenuBarAction->setChecked( menuBar()->isVisible() );
|
||||
|
||||
KParts::MainWindow::showEvent(e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue