check the _controls is not null
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 20 Dec 2002 06:50:35 +0000 (06:50 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 20 Dec 2002 06:50:35 +0000 (06:50 -0000)
svn path=/trunk/mcs/; revision=9792

mcs/class/System.Web/System.Web.UI/Control.cs

index 0f031419429ba39a8b611a1aa7f5f3b31c348a27..229d46dcc897e92e94a5de9a14cc968e7edaba92 100644 (file)
@@ -650,6 +650,9 @@ namespace System.Web.UI
                        if (_visible) {\r
                                EnsureChildControls ();\r
                                OnPreRender (EventArgs.Empty);\r
+                               if (_controls == null)\r
+                                       return;\r
+\r
                                foreach (Control c in _controls)\r
                                        c.PreRenderRecursiveInternal ();\r
                        }\r