From ecf3241d1589578c917f0a42aff8150944eebf2f Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 17 Oct 2023 20:12:50 +0200 Subject: [PATCH] rpcserver: fix nil pointer for missing universe ID --- rpcserver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpcserver.go b/rpcserver.go index 9fbeab60c..c113bc3de 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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 {