mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Document: npe in assertion fixed
This commit is contained in:
@@ -526,9 +526,12 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
|
||||
@NotNull
|
||||
private DocumentEvent doBeforeChangedUpdate(int offset, CharSequence oldString, CharSequence newString, boolean wholeTextReplaced) {
|
||||
VirtualFile file = FileDocumentManager.getInstance().getFile(this);
|
||||
if (file != null && !file.isValid()) {
|
||||
LOG.error("File of this document has been deleted.");
|
||||
FileDocumentManager manager = FileDocumentManager.getInstance();
|
||||
if (manager != null) {
|
||||
VirtualFile file = manager.getFile(this);
|
||||
if (file != null && !file.isValid()) {
|
||||
LOG.error("File of this document has been deleted.");
|
||||
}
|
||||
}
|
||||
|
||||
DocumentEvent event = new DocumentEventImpl(this, offset, oldString, newString, myModificationStamp, wholeTextReplaced);
|
||||
|
||||
Reference in New Issue
Block a user