flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-26948) Null reference in Slider class: updateDisplayList
Date Fri, 24 May 2013 07:29:19 GMT

     [ https://issues.apache.org/jira/browse/FLEX-26948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Justin Mclean resolved FLEX-26948.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Apache Flex 4.10.0

Checked into develop.
                
> Null reference in Slider class: updateDisplayList
> -------------------------------------------------
>
>                 Key: FLEX-26948
>                 URL: https://issues.apache.org/jira/browse/FLEX-26948
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: Slider
>    Affects Versions: Adobe Flex SDK 4.1 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Browser: Internet Explorer 7.x
> Language Found: English
>            Reporter: Adobe JIRA
>              Labels: easyfix
>             Fix For: Apache Flex 4.10.0
>
>
> We ran into a null reference in the mx Slider class, though the steps to reproduce are
unknown. It happened in the updateDisplayList function, in the following code snippet:
>    var isHorizontal:Boolean = (_direction == SliderDirection.HORIZONTAL);
>    var numLabels:int = labelObjects ? labelObjects.numChildren : 0;
>    var numThumbs:int = thumbs ? thumbs.numChildren : 0;
>    var trackMargin:Number = getStyle("trackMargin");
>    var widestThumb:Number = 6;
>    var firstThumb:SliderThumb = SliderThumb(thumbs.getChildAt(0));
>    if (thumbs && firstThumb)
>        widestThumb = firstThumb.getExplicitOrMeasuredWidth();
> Note that the statement assigning numThumbs checks for null, but the statement assigning
firstThumb does not. We had a null thumbs, which caused the firstThumb assignment to fail.
> The fix should be a simple matter of checking for null thumbs when assigning firstThumb.
>  
>  Actual Results:
>  An ActionScript error has occurred:
>  TypeError: Error #1009: Cannot access a property or method of a null object reference.

>  
>  Expected Results:
>  No runtime error
>  
>  Workaround (if any):
>  unknown

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message