fakhirsh / FEngine

Highly cross-platform Game Engine. Simple yet powerful Component based, data driven architecture.
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

ProcessScheduler is crashing #5

Closed fakhirsh closed 9 years ago

fakhirsh commented 9 years ago

The Update() method in the ProcessScheduler needs to be rewritten. The processes that are active need to be checked Separately from the processes that are already terminated.

Currently everything is being processed in one big switch statement. If any process attaches a child and deletes itself, the iterator updates to incorrect value resulting in a Crash.

fakhirsh commented 9 years ago

Done.

The process was being deleted right in the middle of the loop iteration thereby changing list size but it wasn't updating the iterator accordingly, hence causing crash.