Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Apache Flex 4.11.0
-
Any
Description
When a CartesianChart is initialized with a null Axis, which can be created in the future an propagated through bindings, the chart throws RTE because the value is not validated if it's null or not.
In AxisRenderer,
public function set axis(value:IAxis):void
{
if (_axis)
_axis = value;
value.addEventListener("axisChange", axisChangeHandler,
false, 0, true);
value.addEventListener("titleChange", titleChangeHandler,
false, 0, true);
}
should be
public function set axis(value:IAxis):void
{
if (_axis)
{ _axis.removeEventListener("axisChange", axisChangeHandler, false); _axis.removeEventListener("titleChange", titleChangeHandler, false); }
_axis = value;
if(value)
}