mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:53:52 +00:00
Prevent write to empty vector element
This commit is contained in:
parent
ceae2d664d
commit
25feea9b16
2 changed files with 8 additions and 4 deletions
|
@ -278,6 +278,7 @@
|
||||||
Bug #6276: Deleted groundcover instances are not deleted in game
|
Bug #6276: Deleted groundcover instances are not deleted in game
|
||||||
Bug #6294: Game crashes with empty pathgrid
|
Bug #6294: Game crashes with empty pathgrid
|
||||||
Bug #6606: Quests with multiple IDs cannot always be restarted
|
Bug #6606: Quests with multiple IDs cannot always be restarted
|
||||||
|
Bug #6655: Constant effect absorb attribute causes the game to break
|
||||||
Feature #390: 3rd person look "over the shoulder"
|
Feature #390: 3rd person look "over the shoulder"
|
||||||
Feature #832: OpenMW-CS: Handle deleted references
|
Feature #832: OpenMW-CS: Handle deleted references
|
||||||
Feature #1536: Show more information about level on menu
|
Feature #1536: Show more information about level on menu
|
||||||
|
|
|
@ -109,10 +109,6 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
bool allowSelf = (effect->mData.mFlags & ESM::MagicEffect::CastSelf) != 0;
|
bool allowSelf = (effect->mData.mFlags & ESM::MagicEffect::CastSelf) != 0;
|
||||||
bool allowTouch = (effect->mData.mFlags & ESM::MagicEffect::CastTouch) && !mConstantEffect;
|
bool allowTouch = (effect->mData.mFlags & ESM::MagicEffect::CastTouch) && !mConstantEffect;
|
||||||
bool allowTarget = (effect->mData.mFlags & ESM::MagicEffect::CastTarget) && !mConstantEffect;
|
|
||||||
|
|
||||||
if (!allowSelf && !allowTouch && !allowTarget)
|
|
||||||
return; // TODO: Show an error message popup?
|
|
||||||
|
|
||||||
setMagicEffect(effect);
|
setMagicEffect(effect);
|
||||||
mEditing = false;
|
mEditing = false;
|
||||||
|
@ -617,6 +613,13 @@ namespace MWGui
|
||||||
const ESM::MagicEffect* effect =
|
const ESM::MagicEffect* effect =
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(mSelectedKnownEffectId);
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(mSelectedKnownEffectId);
|
||||||
|
|
||||||
|
bool allowSelf = (effect->mData.mFlags & ESM::MagicEffect::CastSelf) != 0;
|
||||||
|
bool allowTouch = (effect->mData.mFlags & ESM::MagicEffect::CastTouch) && !mConstantEffect;
|
||||||
|
bool allowTarget = (effect->mData.mFlags & ESM::MagicEffect::CastTarget) && !mConstantEffect;
|
||||||
|
|
||||||
|
if (!allowSelf && !allowTouch && !allowTarget)
|
||||||
|
return; // TODO: Show an error message popup?
|
||||||
|
|
||||||
if (effect->mData.mFlags & ESM::MagicEffect::TargetSkill)
|
if (effect->mData.mFlags & ESM::MagicEffect::TargetSkill)
|
||||||
{
|
{
|
||||||
delete mSelectSkillDialog;
|
delete mSelectSkillDialog;
|
||||||
|
|
Loading…
Reference in a new issue