Skip to content

Commit

Permalink
check if EditorAdaptersFactoryService gives us a null buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarolf committed Jul 30, 2020
1 parent 75af7e1 commit 69937f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public FrameListener(VisualStudioActiveDocumentTracker service, IVsWindowFrame f
{
_textBuffer = _documentTracker._editorAdaptersFactoryService.GetDocumentBuffer(bufferAdapter);

if (!_textBuffer.ContentType.IsOfType(ContentTypeNames.RoslynContentType))
if (_textBuffer != null && !_textBuffer.ContentType.IsOfType(ContentTypeNames.RoslynContentType))
{
_textBuffer.Changed += NonRoslynTextBuffer_Changed;
}
Expand Down

0 comments on commit 69937f8

Please sign in to comment.