fixed a runtime problem with stl container usage, as reported on bf-committers mailin...
authorErwin Coumans <blender@erwincoumans.com>
Mon, 16 Jan 2006 19:34:52 +0000 (19:34 +0000)
committerErwin Coumans <blender@erwincoumans.com>
Mon, 16 Jan 2006 19:34:52 +0000 (19:34 +0000)
source/gameengine/Converter/BL_ActionActuator.cpp

index 113556f0b11cbe642432a1fe97da92cb5eebc518..ee47f86157e06e660c471ef8c78171ff44e6a5d9 100644 (file)
@@ -168,16 +168,16 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
        // maybe there are events for us in the queue !
        if (frame)
        {
-               for (vector<CValue*>::iterator i=m_events.end(); !(i==m_events.begin());)
+               for (vector<CValue*>::iterator i=m_events.begin(); !(i==m_events.end());i++)
                {
-                       i--;
                        if ((*i)->GetNumber() == 0.0f)
                                bNegativeEvent = true;
                        else
                                bPositiveEvent= true;
                        (*i)->Release();
-                       m_events.pop_back();
+               
                }
+               m_events.clear();
                
                if (bPositiveEvent)
                        m_flag |= ACT_FLAG_ACTIVE;