fix dumb crash with dynamically initialized widgets
This commit is contained in:
@@ -24,7 +24,9 @@ namespace OpenRA.Widgets
|
||||
// Calculated internally
|
||||
public Rectangle Bounds;
|
||||
public Rectangle EventBounds;
|
||||
public Widget Parent = null;
|
||||
public Widget Parent = null;
|
||||
|
||||
public Widget() { InputHandler = Lazy.New(() => BindHandler(Delegate)); }
|
||||
|
||||
public virtual void Initialize()
|
||||
{
|
||||
@@ -54,8 +56,6 @@ namespace OpenRA.Widgets
|
||||
child.Initialize();
|
||||
EventBounds = Rectangle.Union(EventBounds, child.EventBounds);
|
||||
}
|
||||
|
||||
InputHandler = Lazy.New(() => BindHandler(Delegate));
|
||||
}
|
||||
|
||||
static IWidgetDelegate BindHandler(string name)
|
||||
|
||||
Reference in New Issue
Block a user