mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Fix accessing potentially non-existing UI element
This commit is contained in:
parent
e5df7656a2
commit
108688389e
@ -173,7 +173,8 @@ GeneralOptionsTab::GeneralOptionsTab()
|
||||
scalingLabel->setText(scalingToLabelString(currentResolution["scaling"].Integer()));
|
||||
|
||||
std::shared_ptr<CLabel> longTouchLabel = widget<CLabel>("longTouchLabel");
|
||||
longTouchLabel->setText(longTouchToLabelString(settings["general"]["longTouchTimeMilliseconds"].Integer()));
|
||||
if (longTouchLabel)
|
||||
longTouchLabel->setText(longTouchToLabelString(settings["general"]["longTouchTimeMilliseconds"].Integer()));
|
||||
|
||||
std::shared_ptr<CToggleButton> spellbookAnimationCheckbox = widget<CToggleButton>("spellbookAnimationCheckbox");
|
||||
spellbookAnimationCheckbox->setSelected(settings["video"]["spellbookAnimation"].Bool());
|
||||
|
Loading…
Reference in New Issue
Block a user