LSP: prevent nullptr access

Found by coverity scan

Change-Id: Ibc243abbb40cde8c670084c9486fdd2f47b137de
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-07-28 12:57:00 +02:00
parent cf183a898d
commit 91e78936fe

View File

@@ -1152,7 +1152,7 @@ void Client::sendPostponedDocumentUpdates()
sendContent(DidChangeTextDocumentNotification(params));
emit documentUpdated(document);
if (currentWidget->textDocument() == document)
if (currentWidget && currentWidget->textDocument() == document)
cursorPositionChanged(currentWidget);
}
}