Affects Version/s: Adobe Flex SDK 4.1 (Release)
Fix Version/s: None
Environment:Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Steps to reproduce:
Please validate width and hight on NaN in mx.skins.ProgrammaticSkin.as
g.drawRect(x, y, width, height); failing draw component custom skin if width or height equals to null or undefined.
Currently you are validation on ZERO. But in some cases UI component binding size by other UI component (what may not be created or not in the current state) to reproduce that problem. For safety I recomment to include
isNaN(width) || isNaN(height)
protected function drawRoundRect(
x:Number, y:Number, width:Number, height:Number,
cornerRadius:Object = null,
color:Object = null,
alpha:Object = null,
gradientMatrix:Matrix = null,
gradientType:String = "linear",
gradientRatios:Array /* of Number */ = null,
hole:Object = null):void
var g:Graphics = graphics;
// Quick exit if weight or height is zero.
// This happens when scaling a component to a very small value,
// which then gets rounded to 0.
if (width == 0 || height == 0 || isNaN(width) || isNaN(height))