Citrus-Engine icon indicating copy to clipboard operation
Citrus-Engine copied to clipboard

StarlingTileSystem destroy() bug

Open Paul-Ollivier opened this issue 12 years ago • 1 comments

sometimes the _timer object hasn't been initialized so it will throw an error in the destroy function.

faulty code :

public function destroy() : void { _timer.removeEventListener(TimerEvent.TIMER, onTimer); _timer.reset();

                   ...

corrected :

public function destroy() : void { if (_timer) { _timer.removeEventListener(TimerEvent.TIMER, onTimer); _timer.reset(); }

  ...

Paul-Ollivier avatar Jul 28 '14 15:07 Paul-Ollivier

Done, thanks!

alamboley avatar Jul 29 '14 06:07 alamboley