Don't choke if the user adds two fields in succession
authorRichard Fairhurst <richard@systemeD.net>
Sun, 19 Jun 2011 09:49:35 +0000 (10:49 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Sun, 19 Jun 2011 09:49:35 +0000 (10:49 +0100)
net/systemeD/controls/DataGridWarningField.as

index 647a614..dbc4777 100644 (file)
@@ -26,7 +26,7 @@ package net.systemeD.controls {
                override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
                        super.updateDisplayList(unscaledWidth, unscaledHeight);
  
-                       if (data.value.indexOf(';')>-1) {
+                       if (data.value && data.value.indexOf(';')>-1) {
                                setStyle('color',0xFF0000);
                                _image.visible=true;
                                _image.x = width -_image.width -5;