mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:50:06 +00:00
fix error when reading an empty location marker file
This commit is contained in:
parent
194638f759
commit
2c9a8a33a4
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue