mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
fix crash
This commit is contained in:
parent
4603bf7767
commit
fd68cfdeeb
1 changed files with 2 additions and 1 deletions
|
|
@ -1321,8 +1321,9 @@ void TabDeckEditor::actRemoveCard()
|
||||||
|
|
||||||
void TabDeckEditor::offsetCountAtIndex(const QModelIndex &idx, int offset)
|
void TabDeckEditor::offsetCountAtIndex(const QModelIndex &idx, int offset)
|
||||||
{
|
{
|
||||||
if (!idx.isValid() || offset == 0)
|
if (!idx.isValid() || deckModel->hasChildren(idx)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const QModelIndex numberIndex = idx.sibling(idx.row(), 0);
|
const QModelIndex numberIndex = idx.sibling(idx.row(), 0);
|
||||||
const int count = deckModel->data(numberIndex, Qt::EditRole).toInt();
|
const int count = deckModel->data(numberIndex, Qt::EditRole).toInt();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue