nadako / Ash-Haxe

Port of Ash entity framework to Haxe
Other
131 stars 37 forks source link

Fix crash bug in Engine.removeAllSystems(). #35

Closed jan-niestadt closed 1 year ago

jan-niestadt commented 7 years ago

The method used to manually advance systemList.head and call system.removeFromEngine(), but removeSystem() already takes care of that. This eventually resulted in a null reference. The offending lines were removed, and the next and previous pointers were set to null after calling removeSystem instead.

intersrc commented 7 years ago

Will it run faster just delete removeSystem(systemList.head); to fix this bug?

jan-niestadt commented 7 years ago

This is not a performance critical part of the code, so clarity is more important in my opinion.