Skip to content

Commit

Permalink
dm: Fix panic in openapi (pingcap#8638) (pingcap#8660)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Apr 5, 2023
1 parent 6313cbf commit 7a7ca72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dm/master/openapi_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,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() {
Expand Down

0 comments on commit 7a7ca72

Please sign in to comment.