Fix NPE in reflow

See microsoft/vscode#72149
This commit is contained in:
Daniel Imms
2019-05-25 21:17:36 -07:00
parent 44e01ba006
commit de8d9a720a
+1 -1
View File
@@ -294,7 +294,7 @@ export class Buffer implements IBuffer {
for (let y = this.lines.length - 1; y >= 0; y--) {
// Check whether this line is a problem
let nextLine = this.lines.get(y) as BufferLine;
if (!nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {
if (!nextLine || !nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {
continue;
}