Don't crash if model set to null
This commit is contained in:
@@ -530,7 +530,7 @@ void KCategorizedView::setModel(QAbstractItemModel *model)
|
||||
QListView::setModel(model);
|
||||
|
||||
// if the model already had information inserted, update our data structures to it
|
||||
if (model->rowCount()) {
|
||||
if (model && model->rowCount()) {
|
||||
slotLayoutChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user