Skip to content

Commit

Permalink
Fix panic: runtime error: invalid memory address or nil pointer deref…
Browse files Browse the repository at this point in the history
…erence
  • Loading branch information
jwilder committed Jun 8, 2014
1 parent 0deec99 commit 57bf3f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func getEvents() chan *Event {
for {
var event *Event
if err := dec.Decode(&event); err != nil || event.Status == "" {
if err == io.EOF || event.Status == "" {
if err == io.EOF || (event != nil && event.Status == "") {
log.Printf("connection closed")
break
}
Expand Down

0 comments on commit 57bf3f4

Please sign in to comment.