mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-24 22:56:36 +00:00
Fix crash when spell buying window is empty
This commit is contained in:
parent
0abbf91477
commit
a73b803592
1 changed files with 6 additions and 4 deletions
|
|
@ -147,12 +147,14 @@ namespace MWGui
|
|||
{
|
||||
mControllerFocus = 0;
|
||||
if (mSpellButtons.size() > 0)
|
||||
{
|
||||
mSpellButtons[0].first->setStateSelected(true);
|
||||
|
||||
MWBase::WindowManager* winMgr = MWBase::Environment::get().getWindowManager();
|
||||
winMgr->setControllerTooltip(Settings::gui().mControllerTooltips);
|
||||
if (winMgr->getControllerTooltip())
|
||||
MWBase::Environment::get().getInputManager()->warpMouseToWidget(mSpellButtons[0].first);
|
||||
MWBase::WindowManager* winMgr = MWBase::Environment::get().getWindowManager();
|
||||
winMgr->setControllerTooltip(Settings::gui().mControllerTooltips);
|
||||
if (winMgr->getControllerTooltip())
|
||||
MWBase::Environment::get().getInputManager()->warpMouseToWidget(mSpellButtons[0].first);
|
||||
}
|
||||
}
|
||||
|
||||
// Canvas size must be expressed with VScroll disabled, otherwise MyGUI would expand the scroll area when the
|
||||
|
|
|
|||
Loading…
Reference in a new issue