fix error when reading an empty location marker file

This commit is contained in:
AdenKoperczak 2024-10-20 12:34:12 -04:00
parent 194638f759
commit 2c9a8a33a4

View file

@ -254,6 +254,10 @@ bool MarkerModel::setData(const QModelIndex& index,
void MarkerModel::HandleMarkersInitialized(size_t count) void MarkerModel::HandleMarkersInitialized(size_t count)
{ {
if (count == 0)
{
return;
}
const int index = static_cast<int>(count - 1); const int index = static_cast<int>(count - 1);
beginInsertRows(QModelIndex(), 0, index); beginInsertRows(QModelIndex(), 0, index);