Skip to content

Commit

Permalink
Save() fails if Document is null, check if item needs to be saved first
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzngard committed Jul 28, 2020
1 parent e449c55 commit 2d186de
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,10 @@ protected override void ApplyDocumentInfoChanged(DocumentId documentId, Document
}

// Must save the document first for things like Breakpoints to be preserved.
projectItemForDocument.Save();
if (!projectItemForDocument.Saved)
{
projectItemForDocument.Save();
}

var uniqueName = projectItemForDocument.Collection
.GetUniqueNameIgnoringProjectItem(
Expand Down

0 comments on commit 2d186de

Please sign in to comment.