diff options
| author | Frank Reininghaus <[email protected]> | 2010-11-17 15:10:12 +0000 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2010-11-17 15:10:12 +0000 |
| commit | 857b04711ad0f2860761558a18906e8c7891319f (patch) | |
| tree | 6b057488ba70a21d97c73ba43ee9840ff880ea1c /src | |
| parent | 81fdb546b722f5abe4d56a7fdc95f34d92b3eeea (diff) | |
Verify that the pointer m_extensionsFactory is not 0 before
dereferencing it. Fixes a possible crash when initialising the
Details View in Konqueror, caused by an indirect resizing the of
columns before the DolphinDetailsView constructor is finished.
CCBUG: 257035
svn path=/trunk/KDE/kdebase/apps/; revision=1198138
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/dolphindetailsview.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/views/dolphindetailsview.cpp b/src/views/dolphindetailsview.cpp index 3b197115e..2d0d522ac 100644 --- a/src/views/dolphindetailsview.cpp +++ b/src/views/dolphindetailsview.cpp @@ -675,8 +675,12 @@ KFileItemDelegate::Information DolphinDetailsView::infoForColumn(int columnIndex void DolphinDetailsView::adjustMaximumSizeForEditing(const QModelIndex& index) { - // Make sure that the full width of the "Name" column is available for "Rename Inline" - m_extensionsFactory->fileItemDelegate()->setMaximumSize(QTreeView::visualRect(index).size()); + // Make sure that the full width of the "Name" column is available for "Rename Inline". + // Before we do that, we have to check if m_extensionsFactory has been initialised because + // it is possible that we end up here before the constructor is finished (see bug 257035) + if (m_extensionsFactory) { + m_extensionsFactory->fileItemDelegate()->setMaximumSize(QTreeView::visualRect(index).size()); + } } #include "dolphindetailsview.moc" |
