summaryrefslogtreecommitdiff
path: root/src/gui/windows/skilldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r--src/gui/windows/skilldialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index c5eb45c02..a11e0b5aa 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -849,7 +849,7 @@ void SkillDialog::addSkillDuration(SkillInfo *const skill)
void SkillDialog::slowLogic()
{
- FOR_EACH (std::vector<SkillInfo*>::iterator, it, mDurations)
+ FOR_EACH_SAFE (std::vector<SkillInfo*>::iterator, it, mDurations)
{
SkillInfo *const skill = *it;
if (skill)
@@ -861,6 +861,8 @@ void SkillDialog::slowLogic()
skill->cooldown = 0;
skill->duration = 0;
skill->durationTime = 0;
+ if (it == mDurations.end())
+ return;
if (it != mDurations.begin())
-- it;
}