mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Fix crash due to null mCardCounters (#5984)
This commit is contained in:
parent
39df168891
commit
30730fe632
1 changed files with 2 additions and 1 deletions
|
|
@ -849,6 +849,8 @@ void Player::retranslateUi()
|
|||
aCreateAnotherToken->setText(tr("C&reate another token"));
|
||||
createPredefinedTokenMenu->setTitle(tr("Cr&eate predefined token"));
|
||||
|
||||
mCardCounters->setTitle(tr("Ca&rd counters"));
|
||||
|
||||
QMapIterator<int, AbstractCounter *> counterIterator(counters);
|
||||
while (counterIterator.hasNext()) {
|
||||
counterIterator.next().value()->retranslateUi();
|
||||
|
|
@ -898,7 +900,6 @@ void Player::retranslateUi()
|
|||
|
||||
auto &cardCounterSettings = SettingsCache::instance().cardCounters();
|
||||
|
||||
mCardCounters->setTitle(tr("Ca&rd counters"));
|
||||
for (int i = 0; i < aAddCounter.size(); ++i) {
|
||||
aAddCounter[i]->setText(tr("&Add counter (%1)").arg(cardCounterSettings.displayName(i)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue