diff --git a/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs b/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs index c52978c096..6af772931c 100644 --- a/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs @@ -26,10 +26,12 @@ namespace OpenRA.Widgets.Delegates { var r = Chrome.rootWidget; r.GetWidget("CONNECTION_BUTTON_ABORT").OnMouseUp = mi => { + r.GetWidget("CONNECTION_BUTTON_ABORT").Parent.Visible = false; Game.Disconnect(); return true; }; r.GetWidget("CONNECTION_BUTTON_CANCEL").OnMouseUp = mi => { + r.GetWidget("CONNECTION_BUTTON_CANCEL").Parent.Visible = false; Game.Disconnect(); return true; }; diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index 0bd4c9c935..e3ac9f4f5d 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -215,7 +215,8 @@ namespace OpenRA.Widgets public Widget OpenWindow(string id) { - Chrome.rootWidget.GetWidget(WindowList.Peek()).Visible = false; + if (WindowList.Count > 0) + Chrome.rootWidget.GetWidget(WindowList.Peek()).Visible = false; WindowList.Push(id); var window = Chrome.rootWidget.GetWidget(id); window.Visible = true;