Skip to content

Commit

Permalink
feat: fix panic
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed Dec 1, 2023
1 parent fc6ca50 commit 03b211e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/vtctl/grpcvtctldserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2752,7 +2752,7 @@ func (s *VtctldServer) PlannedReparentShard(ctx context.Context, req *vtctldatap
resp.Keyspace = ev.ShardInfo.Keyspace()
resp.Shard = ev.ShardInfo.ShardName()

if !topoproto.TabletAliasIsZero(ev.NewPrimary.Alias) {
if ev.NewPrimary != nil && !topoproto.TabletAliasIsZero(ev.NewPrimary.Alias) {
resp.PromotedPrimary = ev.NewPrimary.Alias
}
}
Expand Down

0 comments on commit 03b211e

Please sign in to comment.