Don't crash if model set to null

This commit is contained in:
Craig Drummond
2018-03-06 22:00:03 +00:00
parent 2ad371d6f9
commit d6fd1b4d32

View File

@@ -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();
}
}