+2006-09-08 Robert Jordan <robertj@gmx.net>
+
+ * TraceData.cs: fixed NRE if `sizes' is null, which may happen
+ if a page was unable to save its viewstate and size.
+
2006-09-07 Andrew Skiba <andrews@mainsoft.com>
* HttpApplicationFactory.cs: ifdef the previous fix with TARGET_JVM to
r ["ControlId"] = c.UniqueID;
r ["Type"] = c.GetType ();
r ["Depth"] = control_pos;
- object s = sizes [c];
- r ["RenderSize"] = (s == null) ? 0 : (int) s;
+ r ["RenderSize"] = GetRenderSize (c);
r ["ViewstateSize"] = GetViewStateSize (c, (ctrl_vs != null) ? ctrl_vs [c] : null);
control_data.Rows.Add (r);
}
}
+ int GetRenderSize (Control ctrl)
+ {
+ if (sizes == null)
+ return 0;
+
+ object s = sizes [ctrl];
+ return s == null ? 0 : (int) s;
+ }
+
static int GetViewStateSize (Control ctrl, object vs)
{
if (vs == null)