From d3ac6e195e3717a491280a9b5e1e47414e722cc4 Mon Sep 17 00:00:00 2001 From: Alan McGovern Date: Fri, 17 May 2013 11:32:12 -0400 Subject: [Designer.iOS] Fix an exception when ActiveDocument is null This happens all the time when pressing cmd-w repeatedly to close multiple windows in a row. --- main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs') diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs index e3f28cea05..c816b7357e 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs @@ -167,7 +167,8 @@ namespace MonoDevelop.Ide.Commands { protected override void Run () { - IdeApp.Workbench.ActiveDocument.Close (); + if (IdeApp.Workbench.ActiveDocument != null) + IdeApp.Workbench.ActiveDocument.Close (); } protected override void Update (CommandInfo info) -- cgit v1.2.3