         
         // To avoid flashing, force all of the layers to render now
         
-        backgroundLayer.validateNow();
-        selectionLayer.validateNow();
-        overlayLayer.validateNow();
+        if (backgroundLayer) backgroundLayer.validateNow();
+        if (selectionLayer) selectionLayer.validateNow();
+        if (overlayLayer) overlayLayer.validateNow();
         
         // The old visible row,column indices are no longer needed
         

    
    private function layoutEditorIndicator(layer:GridLayer):void
    {
        const rowIndex:int = grid.dataGrid.editorRowIndex;
        const columnIndex:int = grid.dataGrid.editorColumnIndex;
        var indicatorFactory:IFactory = grid.dataGrid.editorIndicator;
        
        // If the indicatorFactory has changed for the specified non-null indicator, 
        // then free the old indicator.

import mx.events.CollectionEventKind;
import mx.events.PropertyChangeEvent;

import spark.components.DataGrid;
import spark.components.Grid;
import spark.layouts.supportClasses.LayoutBase;

