Skip to content

Commit

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

0 comments on commit 3ed2b55

Please sign in to comment.