Skip to content

Commit

Permalink
Merge pull request #80 from YoshihiroIto/master
Browse files Browse the repository at this point in the history
Fix NullReferenceException
  • Loading branch information
danipen authored Jan 12, 2025
2 parents 0577dc5 + ce73612 commit c25a3a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TextMateSharp/Model/TMModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,11 @@ public bool IsLineInvalid(int lineIndex)

public void InvalidateLine(int lineIndex)
{
this._lines.Get(lineIndex).IsInvalid = true;
var line = this._lines.Get(lineIndex);
if (line == null)
return;

line.IsInvalid = true;

lock (_lock)
{
Expand Down

0 comments on commit c25a3a9

Please sign in to comment.