alamboley/Citrus-Engine — pull request #207 by RazorDE (2014-06-07 18:23:22+00:00)
Title: bugfix: null object reference in the set-method "oneWay"

When adding a platform object from a tmx-map then the set-method
"oneWay" of the "Plaform"-class (Nape) tries to add a prelistener and a
callback type to the body object which has not been created at this
point.

This doesn't lead to an exception because the try-catch-construction in
the "setParams"-method of the "CitrusObject" catches it. But this method
is not meant to catch this error and therefore displays a misleading
response (Warning: The parameter OneWay does not exist on [class
platform] ...).

I've changed the code such that the prelistener and callback type will
not be added if the body doesn't exist. The "createConstraint"-method
which is called later in the process already takes care of this
instead.