Skip to content

Commit 63e0fa8

Browse files
authored
check if grpc server is nil before accessing it (#606)
Signed-off-by: Arne Rutjes <[email protected]>
1 parent ba7cc53 commit 63e0fa8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

platform/view/sdk/dig/sdk.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,9 @@ func (p *SDK) Start(ctx context.Context) error {
179179
KVS *kvs.KVS
180180
TracerProvider trace.TracerProvider
181181
}) error {
182-
protos.RegisterViewServiceServer(in.GRPCServer.Server(), in.ViewService)
183-
182+
if in.GRPCServer != nil {
183+
protos.RegisterViewServiceServer(in.GRPCServer.Server(), in.ViewService)
184+
}
184185
in.CommService.Start(ctx)
185186

186187
view3.InstallViewHandler(in.ViewManager, in.ViewService, in.TracerProvider)

0 commit comments

Comments
 (0)