]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix possible crash if no model is set
authorPeter Penz <peter.penz19@gmail.com>
Tue, 21 Feb 2012 16:18:37 +0000 (17:18 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 21 Feb 2012 16:20:27 +0000 (17:20 +0100)
When updating the siblings-information by e.g. a call to
setSupportsItemExpanding() it is possible that the model is not
set yet.

src/kitemviews/kitemlistview.cpp

index 372726954ffc41fe1c86a2ce423d34b0fae7de8f..907bf624dd3e6029f407e5e2fb1eb99a9bbb65fa 100644 (file)
@@ -2057,7 +2057,7 @@ void KItemListView::updateGroupHeaderHeight()
 
 void KItemListView::updateSiblingsInformation(int firstIndex, int lastIndex)
 {
-    if (!supportsItemExpanding()) {
+    if (!supportsItemExpanding() || !m_model) {
         return;
     }