From 6e833fcc4ba9697df58c9a5b1bf35cbf6f0cc70e Mon Sep 17 00:00:00 2001 From: Felix Rohrbach Date: Wed, 21 Sep 2011 16:23:37 +0200 Subject: Don't crash if the rekonqui.rc file can't be found REVIEW: 102673 CCBUG: 282474 --- src/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7954bb63..528ec217 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -614,7 +614,11 @@ void MainWindow::finalizeGUI(KXMLGUIClient* client) KXmlGuiWindow::finalizeGUI(client); //update rekonqMenu when GUI has changed KMenu *m = qobject_cast(factory()->container("rekonqMenu", this)); - m_rekonqMenu->addActions(m->actions()); + if (m) + m_rekonqMenu->addActions(m->actions()); + else + kDebug() << "Could not get the rekonqMenu menu. Maybe the rekonqui.rc file wasn't found. Was" + << "rekonq installed correctly?"; } -- cgit v1.2.1