From 2348e07447e6e4c576e4f33750b2de40620d54ed Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 15 Jun 2012 13:56:00 -0500 Subject: Fix crash when no modules are available --- systemsettings/kcmsearch.cpp | 2 +- systemsettings/mainwindow.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/systemsettings/kcmsearch.cpp b/systemsettings/kcmsearch.cpp index 6f36c63..8cfb319 100644 --- a/systemsettings/kcmsearch.cpp +++ b/systemsettings/kcmsearch.cpp @@ -28,7 +28,7 @@ #include "moduleiconitem.h" KcmSearch::KcmSearch( TQPtrList *moduleViewList, TQWidget *parent, const char *name ) - : KIconViewSearchLine(parent, moduleViewList->at(0)->groups[0], name){ + : KIconViewSearchLine(parent, (moduleViewList->at(0))?moduleViewList->at(0)->groups[0]:NULL, name){ this->moduleViewList = moduleViewList; } diff --git a/systemsettings/mainwindow.cpp b/systemsettings/mainwindow.cpp index a06c69c..866af19 100644 --- a/systemsettings/mainwindow.cpp +++ b/systemsettings/mainwindow.cpp @@ -180,7 +180,9 @@ void MainWindow::buildActions() kdDebug() << "relpath is :" << group->relPath() << endl; } } - pageActions.at(0)->setChecked(true); + if (pageActions.at(0)) { + pageActions.at(0)->setChecked(true); + } } void MainWindow::aboutCurrentModule() -- cgit v1.2.1