From cfe0ab836443f4e9e83bbdea02ee5022e8078010 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Fri, 12 Oct 2012 15:46:21 +0200 Subject: [PATCH] Fix crash --- configuredialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configuredialog.cpp b/configuredialog.cpp index 15bc98ce0..dbc994198 100644 --- a/configuredialog.cpp +++ b/configuredialog.cpp @@ -2597,7 +2597,8 @@ ComposerPageCustomTemplatesTab::ComposerPageCustomTemplatesTab( QWidget * parent connect( mWidget, SIGNAL(changed()), this, SLOT(slotEmitChanged()) ); - connect( mWidget, SIGNAL(templatesUpdated()), KMKernel::self(), SLOT(updatedTemplates()) ); + if( KMKernel::self() ) + connect( mWidget, SIGNAL(templatesUpdated()), KMKernel::self(), SLOT(updatedTemplates()) ); } void ComposerPage::CustomTemplatesTab::doLoadFromGlobalSettings() @@ -3230,7 +3231,8 @@ ComposerPageAutoCorrectionTab::ComposerPageAutoCorrectionTab(QWidget *parent) vlay->setSpacing( 0 ); vlay->setMargin( 0 ); autocorrectionWidget = new MessageComposer::KMComposerAutoCorrectionWidget(this); - autocorrectionWidget->setAutoCorrection(KMKernel::self()->composerAutoCorrection()); + if(KMKernel::self()) + autocorrectionWidget->setAutoCorrection(KMKernel::self()->composerAutoCorrection()); vlay->addWidget(autocorrectionWidget); setLayout(vlay); connect( autocorrectionWidget, SIGNAL(changed()), this, SLOT(slotEmitChanged()) );