diff --git a/src/ui/maplistmodels.cpp b/src/ui/maplistmodels.cpp index 6c0a06d1b..b4f6e9dce 100644 --- a/src/ui/maplistmodels.cpp +++ b/src/ui/maplistmodels.cpp @@ -220,6 +220,8 @@ QModelIndex MapGroupModel::indexOfMap(QString mapName) { } QVariant MapGroupModel::data(const QModelIndex &index, int role) const { + if (!index.isValid()) return QVariant(); + int row = index.row(); int col = index.column();