diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-06-04 13:22:36 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-06-04 13:22:36 -0500 |
commit | f29ac1d2849f720868da0eae03981a446c0316a0 (patch) | |
tree | 3d3abab98b4c9092cad3949c40f7fb732cda2ca3 | |
parent | b5c729ae448fd43f491705e84f4e34543fdebdf4 (diff) | |
download | tdebase-f29ac1d2849f720868da0eae03981a446c0316a0.tar.gz tdebase-f29ac1d2849f720868da0eae03981a446c0316a0.zip |
Fix sporadic Kate crash first reported in KDE bug 140135
-rw-r--r-- | kate/app/katefilelist.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kate/app/katefilelist.cpp b/kate/app/katefilelist.cpp index 24062336a..05763e988 100644 --- a/kate/app/katefilelist.cpp +++ b/kate/app/katefilelist.cpp @@ -364,11 +364,16 @@ void KateFileList::updateFileListLocations() TQListViewItem* item = firstChild(); int i=0; while (item) { + Kate::Document* itemDocument = ((KateFileListItem *)item)->document(); if (m_sort == KateFileList::sortManual) { - ((KateFileListItem *)item)->document()->setDocumentListPosition(i); + if (KateDocManager::self()->findDocument(itemDocument) >= 0) { + itemDocument->setDocumentListPosition(i); + } } else { - ((KateFileListItem *)item)->document()->setDocumentListPosition(-1); + if (KateDocManager::self()->findDocument(itemDocument) >= 0) { + itemDocument->setDocumentListPosition(-1); + } } item = item->itemBelow(); i++; |