diff options
Diffstat (limited to 'src/playerinfo.cpp')
-rw-r--r-- | src/playerinfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp index 769d24a16..562795563 100644 --- a/src/playerinfo.cpp +++ b/src/playerinfo.cpp @@ -68,7 +68,10 @@ void triggerAttr(int id, int old) void triggerStat(int id, const std::string &changed, int old1, int old2) { - StatMap::iterator it = mData.mStats.find(id); + StatMap::const_iterator it = mData.mStats.find(id); + if (it == mData.mStats.end()) + return; + Mana::Event event(Mana::EVENT_UPDATESTAT); event.setInt("id", id); event.setInt("base", it->second.base); |