Skip to content

Commit da4529a

Browse files
SajjadAlipoursoheilpro
authored andcommitted
Fix null reference exception error on startup
1 parent 1de0af7 commit da4529a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Projects/Package/Sources/Xinq/XinqEditorPane.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ public int GetGuidEditorType(out Guid pClassID)
142142

143143
public int IsDocDataDirty(out int pfDirty)
144144
{
145-
pfDirty = _document.IsDirty ? 1 : 0;
145+
pfDirty = _document?.IsDirty == true ? 1 : 0;
146146

147147
return VSConstants.S_OK;
148148
}
149149

150150
public int IsDocDataReadOnly(out int pfReadOnly)
151151
{
152-
pfReadOnly = _document.IsReadOnly ? 1 : 0;
152+
pfReadOnly = _document?.IsReadOnly == true ? 1 : 0;
153153

154154
return VSConstants.S_OK;
155155
}

0 commit comments

Comments
 (0)