diff --git a/dm/dm/master/openapi_view.go b/dm/dm/master/openapi_view.go index 5d6648e5fc8..3dbc6a97c53 100644 --- a/dm/dm/master/openapi_view.go +++ b/dm/dm/master/openapi_view.go @@ -115,7 +115,7 @@ func (s *Server) GetDocJSON(c *gin.Context) { if info, err := s.getClusterInfo(c.Request.Context()); err != nil { _ = c.Error(err) return - } else if info.Topology.MasterTopologyList != nil && len(*info.Topology.MasterTopologyList) > 0 { + } else if info.Topology != nil && info.Topology.MasterTopologyList != nil && len(*info.Topology.MasterTopologyList) > 0 { masterTopos := *info.Topology.MasterTopologyList protocol := "http" if useTLS.Load() {