Skip to content

Commit

Permalink
rpcserver: fix nil pointer for missing universe ID
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Oct 17, 2023
1 parent 7ccedc9 commit ecf3241
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2802,6 +2802,10 @@ func unmarshalAssetSyncConfig(

// UnmarshalUniID parses the RPC universe ID into the native counterpart.
func UnmarshalUniID(rpcID *unirpc.ID) (universe.Identifier, error) {
if rpcID == nil {
return universe.Identifier{}, fmt.Errorf("missing universe id")
}

// Unmarshal the proof type.
proofType, err := UnmarshalUniProofType(rpcID.ProofType)
if err != nil {
Expand Down

0 comments on commit ecf3241

Please sign in to comment.