Skip to content

Commit

Permalink
guard against nil data source to avoid crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
rakaramos authored and cmyr committed Nov 18, 2018
1 parent dc64731 commit b0e23d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/XiEditor/EditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ final class EditView: NSView, NSTextInputClient, TextPlaneDelegate {

/// timer callback to toggle the blink state
@objc func _blinkInsertionPoint() {
guard dataSource != nil else { return }

_cursorStateOn = !_cursorStateOn
partialInvalidate(invalid: dataSource.lines.cursorInval)
}
Expand Down

0 comments on commit b0e23d9

Please sign in to comment.