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

Commit 7936c32

Browse files
committed
XmlDocumentationElement: return null if given a null entity
1 parent 93e368d commit 7936c32

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Libraries/NRefactory/ICSharpCode.NRefactory.Xml/DocumentationElement.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public class XmlDocumentationElement
3939
/// </summary>
4040
public static XmlDocumentationElement Get(IEntity entity, bool inheritDocIfMissing = true)
4141
{
42+
if (entity == null)
43+
return null;
4244
var documentationComment = entity.Documentation;
4345
if (documentationComment != null) {
4446
return Create(documentationComment, entity);

0 commit comments

Comments
 (0)