      */
     private function drawButtonFocus(index:int, focused:Boolean):void
     {
-        var n:int = dataProvider.length;
+        var n:int = dataProvider ? dataProvider.length : 0;
         if (n > 0 && index < n)
         {
             var renderer:IItemRenderer = 

            return;

        if (!enabled)
            return;

        var length:int = dataProvider.length;

     */
    private function adjustLayering(focusedIndex:int):void
    {
        var n:int = dataProvider ? dataProvider.length : 0;
        for (var i:int = 0; i < n; i++)
        {
            var renderer:IVisualElement = IVisualElement(dataGroup.getElementAt(i));
