diff --git a/src/debugger/gui/CartARMWidget.cxx b/src/debugger/gui/CartARMWidget.cxx index a63223a54..9aca374af 100644 --- a/src/debugger/gui/CartARMWidget.cxx +++ b/src/debugger/gui/CartARMWidget.cxx @@ -231,9 +231,9 @@ void CartridgeARMWidget::handleChipType() tip = tip.substr(0, 25); buf << tip << "\nCurrent:\n" - << chipProps.MHz << " MHz, " << chipProps.flashBanks << " flash bank" << (chipProps.flashBanks > 1 ? "s" : "") << ", " + << chipProps.MHz << " MHz, " << chipProps.flashCycles - 1 << " wait states"; myChipType->setToolTip(buf.str()); } diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index c091f5756..77d489920 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -752,9 +752,11 @@ const Variant& Settings::value(const string& key) const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Settings::setValue(const string& key, const Variant& value, bool persist) { - auto it = myPermanentSettings.find(key); + const auto it = myPermanentSettings.find(key); + if(it != myPermanentSettings.end()) { - if (persist && it->second != value && myRespository->atomic()) myRespository->atomic()->save(key, value); + if (persist && it->second != value && myRespository->atomic()) + myRespository->atomic()->save(key, value); it->second = value; } else