Skip to content

Commit

Permalink
Merge pull request #2131 from Tyriar/72149_npe
Browse files Browse the repository at this point in the history
Fix NPE in reflow
  • Loading branch information
Tyriar committed May 26, 2019
2 parents 44e01ba + de8d9a7 commit 2f4c5b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2f4c5b9

Please sign in to comment.