diff --git a/src/blackgui/models/atcstationlistmodel.cpp b/src/blackgui/models/atcstationlistmodel.cpp index a203594ef..2e35894fe 100644 --- a/src/blackgui/models/atcstationlistmodel.cpp +++ b/src/blackgui/models/atcstationlistmodel.cpp @@ -166,7 +166,9 @@ namespace BlackGui } else { - beginRemoveRows(QModelIndex(), 0, 0); + QModelIndex parent; + if (rowCount(parent) == 0) { return; } + beginRemoveRows(parent, 0, 0); this->removeIf(&CAtcStation::getCallsign, station.getCallsign()); endRemoveRows(); }