Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2019-09-10 16:41:32 +0300
committerGitHub <noreply@github.com>2019-09-10 16:41:32 +0300
commit9c034cfa518538a17d452c090f1e86bc35065820 (patch)
treed58cee08f382332b2e28ff41f9b29bc304d0e722 /main/src/core/MonoDevelop.Ide
parentbe8dce0348b91e91104061a1b2cdbc5e007d8b7c (diff)
parente82d43d04be982269d4ffc8d88ebf220f4ffb4f7 (diff)
Merge pull request #8608 from mono/fix976445-non-document-views
[Ide] Fix ArgumentNullException when loading non-file documents
Diffstat (limited to 'main/src/core/MonoDevelop.Ide')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentRegistry.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentRegistry.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentRegistry.cs
index 4e5d8c14c0..ffeb87f4e9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentRegistry.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentRegistry.cs
@@ -184,7 +184,7 @@ namespace MonoDevelop.Ide.Gui
void GetLastWriteTime ()
{
try {
- LastSaveTimeUtc = !Document.IsNewDocument ? File.GetLastWriteTimeUtc (Document.FileName) : DateTime.MinValue;
+ LastSaveTimeUtc = (Document.IsFile && !Document.IsNewDocument) ? File.GetLastWriteTimeUtc (Document.FileName) : DateTime.MinValue;
} catch (Exception ex) {
LoggingService.LogError ("Error while getting last write time.", ex);
LastSaveTimeUtc = DateTime.UtcNow;