diff options
| author | Peter Penz <[email protected]> | 2007-09-24 16:18:29 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-09-24 16:18:29 +0000 |
| commit | 4616d291ca5d0e5e985a269db46a7447762c453a (patch) | |
| tree | 9b31d0a7ae9d40453a4277b95a3c0c2d866ce7f6 /src/dolphincolumnview.cpp | |
| parent | 7446edabe488e74cdca73a50457072ad7e93a369 (diff) | |
prevent an invalid active column index if columns have been deleted
svn path=/trunk/KDE/kdebase/apps/; revision=716384
Diffstat (limited to 'src/dolphincolumnview.cpp')
| -rw-r--r-- | src/dolphincolumnview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index ee217b2bd..9fb3e35a8 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -536,6 +536,12 @@ void DolphinColumnView::showColumn(const KUrl& url) (*it)->deleteLater(); } m_columns.erase(start, end); + + const int maxIndex = m_columns.count() - 1; + Q_ASSERT(maxIndex >= 0); + if (m_index > maxIndex) { + m_index = maxIndex; + } break; } } |
