mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-25 21:26:38 +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,6 +147,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mControllerFocus = 0;
|
mControllerFocus = 0;
|
||||||
if (mSpellButtons.size() > 0)
|
if (mSpellButtons.size() > 0)
|
||||||
|
{
|
||||||
mSpellButtons[0].first->setStateSelected(true);
|
mSpellButtons[0].first->setStateSelected(true);
|
||||||
|
|
||||||
MWBase::WindowManager* winMgr = MWBase::Environment::get().getWindowManager();
|
MWBase::WindowManager* winMgr = MWBase::Environment::get().getWindowManager();
|
||||||
|
|
@ -154,6 +155,7 @@ namespace MWGui
|
||||||
if (winMgr->getControllerTooltip())
|
if (winMgr->getControllerTooltip())
|
||||||
MWBase::Environment::get().getInputManager()->warpMouseToWidget(mSpellButtons[0].first);
|
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
|
// Canvas size must be expressed with VScroll disabled, otherwise MyGUI would expand the scroll area when the
|
||||||
// scrollbar is hidden
|
// scrollbar is hidden
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue