From 13d18f777751d4bbc0f2779b2e3f6bf0ca1a3d76 Mon Sep 17 00:00:00 2001 From: Christian Hornung Date: Mon, 29 Sep 2008 09:20:00 +0000 Subject: [PATCH] Fixed SD2-1462 - Exception closing unsaved tab. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3564 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs index a17f7b2a8e..cec58427cc 100644 --- a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs +++ b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs @@ -9,6 +9,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.IO; using System.Linq; using System.Windows.Forms; @@ -392,7 +393,13 @@ namespace ICSharpCode.SharpDevelop.Gui // are closed and their content is no longer found by // the ParserService. LoggingService.Debug("SdiWorkspaceWindow closed with discarding changes, enqueueing files for parsing: " + String.Join(", ", filesToReparse)); - filesToReparse.Foreach(ParserService.EnqueueForParsing); + foreach (string file in filesToReparse) { + if (File.Exists(file)) { + ParserService.EnqueueForParsing(file); + } else { + ParserService.ClearParseInformation(file); + } + } } return true;