Skip to content

Commit

Permalink
Ugh.. Fix a segfault.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Feb 22, 2019
1 parent a92a539 commit 1e16a63
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/watcher/log_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ func (w *LogWatcher) pollDirectoryLocked(c chan Event, pathname string) {
glog.V(2).Infof("sending create for %s", match)
c <- Event{Create, match}
w.watched[match] = &watch{c: c, fi: fi}
case fi.ModTime().Sub(watched.fi.ModTime()) > 0:
case watched.fi != nil && fi.ModTime().Sub(watched.fi.ModTime()) > 0:
glog.V(2).Infof("sending update for %s", match)

c <- Event{Update, match}
w.watched[match].fi = fi
default:
Expand Down

0 comments on commit 1e16a63

Please sign in to comment.