Skip to content

Commit

Permalink
Avoid nil pointer ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
Burcu Dogan committed Dec 31, 2013
1 parent c28bea1 commit 3cbda24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ func (g *Commands) resolveChangeListRecv(
return cl, nil
}
// TODO: handle cases where remote and local type don't match
if !isPush && !r.IsDir {
if !isPush && r != nil && !r.IsDir {
return cl, nil
}

if isPush && !l.IsDir {
if isPush && l != nil && !l.IsDir {
return cl, nil
}

Expand Down

0 comments on commit 3cbda24

Please sign in to comment.