Skip to content

Commit cd5adbb

Browse files
committed
fix missing piece
1 parent 31bb813 commit cd5adbb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/vt/topo/topoproto/srvkeyspace.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ func (sra ShardReferenceArray) Sort() { sort.Sort(sra) }
5151
// SrvKeyspaceGetPartition returns a Partition for the given tablet type,
5252
// or nil if it's not there.
5353
func SrvKeyspaceGetPartition(sk *topodatapb.SrvKeyspace, tabletType topodatapb.TabletType) *topodatapb.SrvKeyspace_KeyspacePartition {
54+
if sk == nil {
55+
return nil
56+
}
5457
for _, p := range sk.Partitions {
5558
if p.ServedType == tabletType {
5659
return p

0 commit comments

Comments
 (0)