Skip to content

Commit

Permalink
Fix nil pointer issue in replication/target
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-zou committed Apr 2, 2018
1 parent 0dd595c commit 35fe857
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/replication/target/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ func (d *DefaultManager) GetTarget(id int64) (*models.RepTarget, error) {
if err != nil {
return nil, err
}

if target == nil {
return nil, nil
}

// decrypt the password
if len(target.Password) > 0 {
key, err := config.SecretKey()
Expand Down

0 comments on commit 35fe857

Please sign in to comment.