anhero / BaconBox

0 stars 1 forks source link

Made getSymbol and getMovieClipEntity made less prone to crashes. #5

Closed samueldr closed 9 years ago

samueldr commented 9 years ago

No more null dereferences, but you need to actually check in your code whether you get nil or not before working with said MovieClip, in cases where you should get them. The previous behaviour was a program abort because of a null dereference.

Since I also added symbolExists(), it could still stop/throw/abort/??? when a symbol does not exist with the given key (mimicking previous behaviour). The game can still verify existence of symbol before instantiating it.