From: Stephan Kulow Date: Thu, 17 May 2007 17:40:51 +0000 (+0000) Subject: fix possible crash (CID 3607) X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/8c2d98fca5c40a19c05a94ad6794bde5fe3608e4 fix possible crash (CID 3607) svn path=/trunk/KDE/kdebase/apps/; revision=665696 --- diff --git a/src/terminalsidebarpage.cpp b/src/terminalsidebarpage.cpp index ec3f1cd79..3e3c21668 100644 --- a/src/terminalsidebarpage.cpp +++ b/src/terminalsidebarpage.cpp @@ -53,7 +53,7 @@ void TerminalSidebarPage::showEvent(QShowEvent* event) { if (m_terminal == 0) { KLibFactory* factory = KLibLoader::self()->factory("libkonsolepart"); - KParts::Part* part = static_cast(factory->create(this, "KParts::ReadOnlyPart")); + KParts::Part* part = factory ? static_cast(factory->create(this, "KParts::ReadOnlyPart")) : 0; if (part != 0) { m_layout->addWidget(part->widget()); m_terminal = qobject_cast(part);