Skip to content

Commit

Permalink
Merge pull request #491 from pjoe/fix490_crash_on_close
Browse files Browse the repository at this point in the history
Fix #490 qml frontend crash on close file
  • Loading branch information
erbridge committed Jan 24, 2015
2 parents 95ccf35 + 8eaa815 commit 504e19e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/qml/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,10 @@ func (fv *frontendView) Line(index int) *lineStruct {
func (fv *frontendView) RegionLines() int {
var count int = 0
regs := fv.bv.Sel().Regions()
for _, r := range regs {
count += len(fv.bv.Buffer().Lines(r))
if fv.bv.Buffer() != nil {
for _, r := range regs {
count += len(fv.bv.Buffer().Lines(r))
}
}
return count
}
Expand Down

0 comments on commit 504e19e

Please sign in to comment.