diff options
author | Alan McGovern <alan@xamarin.com> | 2013-05-17 19:32:12 +0400 |
---|---|---|
committer | Alan McGovern <alan@xamarin.com> | 2013-05-17 19:32:12 +0400 |
commit | d3ac6e195e3717a491280a9b5e1e47414e722cc4 (patch) | |
tree | fda9c0361b38cb4a6748408c31c946ffd94b0c10 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs | |
parent | c5650a2c6468d7f20ef7e9d405375c22c3963c29 (diff) |
[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.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs | 3 |
1 files changed, 2 insertions, 1 deletions
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) |