ecere/gui/DataBox: Fix crash on null 'data' from Form Designer
authorJerome St-Louis <jerome@ecere.com>
Tue, 17 Jun 2014 03:50:12 +0000 (23:50 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 17 Jun 2014 03:50:12 +0000 (23:50 -0400)
ecere/src/gui/controls/DataBox.ec

index c2f733a..4e90f0c 100644 (file)
@@ -147,7 +147,7 @@ private:
 
    void OnRedraw(Surface surface)
    {
-      if(type && (!editor || !editor.created || editor.anchor.left)) // ColorDropBox lets part of the DataBox show
+      if(type && data && (!editor || !editor.created || editor.anchor.left)) // ColorDropBox lets part of the DataBox show
       {
          char tempString[1024];
          if(type._vTbl[__ecereVMethodID_class_OnDisplay] == class(Instance)._vTbl[__ecereVMethodID_class_OnDisplay])