forked from qt-creator/qt-creator
LSP: prevent nullptr access
Found by coverity scan Change-Id: Ibc243abbb40cde8c670084c9486fdd2f47b137de Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1152,7 +1152,7 @@ void Client::sendPostponedDocumentUpdates()
|
||||
sendContent(DidChangeTextDocumentNotification(params));
|
||||
emit documentUpdated(document);
|
||||
|
||||
if (currentWidget->textDocument() == document)
|
||||
if (currentWidget && currentWidget->textDocument() == document)
|
||||
cursorPositionChanged(currentWidget);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user