Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 17abcde

Browse files
committed
Fix #358: NullReferenceException on closing dirty xml file
1 parent 4791b17 commit 17abcde

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Main/SharpDevelop/Parser/ParserServiceEntry.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ Task<ProjectEntry> DoParseAsync(ITextSource fileContent, IProject parentProject,
319319
// Let's look up the file in the list of open files right now
320320
// so that we don't need to SafeThreadCall() later on.
321321
lookupOpenFileOnTargetThread = false;
322-
fileContent = parser.GetFileContent(fileName);
322+
if (parser != null) {
323+
fileContent = parser.GetFileContent(fileName);
324+
}
323325
}
324326
Task<ProjectEntry> task;
325327
lock (this) {

0 commit comments

Comments
 (0)