diff options
| author | David Faure <[email protected]> | 2009-01-26 15:45:39 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2009-01-26 15:45:39 +0000 |
| commit | 591fde8f4a6b6cb56d8e3cbbabaab1df78b7ec0e (patch) | |
| tree | bedbb8090660b383d656b0391778132db996c534 /src/dolphinpart.cpp | |
| parent | 248ce7c57a86f964c82c8e0b48e9c07d52c3934e (diff) | |
Don't crash if parentWidget is 0 (even though I don't recommend setting it to 0, the dirlister mainwindow won't be set if you reparent the widget later on)
BUG: 161681
svn path=/trunk/KDE/kdebase/apps/; revision=916972
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 529d4d423..41930221d 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -62,7 +62,9 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL m_dirLister = new KDirLister; m_dirLister->setAutoUpdate(true); - m_dirLister->setMainWindow(parentWidget->window()); + if (parentWidget) { + m_dirLister->setMainWindow(parentWidget->window()); + } m_dirLister->setDelayedMimeTypes(true); //connect(m_dirLister, SIGNAL(started(KUrl)), this, SLOT(slotStarted())); |
