[Orxonox-commit 5393] r10056 - code/branches/ScriptableController/src/orxonox/controllers
smerkli at orxonox.net
smerkli at orxonox.net
Thu May 15 11:12:31 CEST 2014
Author: smerkli
Date: 2014-05-15 11:12:30 +0200 (Thu, 15 May 2014)
New Revision: 10056
Modified:
code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
Log:
Added a check whether the eventlist is empty, this fixes
the segfault.
Modified: code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc 2014-05-14 18:25:08 UTC (rev 10055)
+++ code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc 2014-05-15 09:12:30 UTC (rev 10056)
@@ -132,7 +132,7 @@
//this->entity_->rotateYaw(-1.0f * 100.0f * dt);
//this->entity_->rotatePitch(0.8f * 100.0f);
- if(eventList[0].eventTime<=scTime)
+ if(eventList.size() > 0 && eventList[0].eventTime<=scTime)
{
/*TO DO: execute the function: eventList[0].fctName*/
More information about the Orxonox-commit
mailing list