Skip to content

Commit

Permalink
fix: nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Aug 29, 2023
1 parent fd6ef4a commit 77b54fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gocq/qsign.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func getAvaliableSignServer() (*config.SignServer, error) {
} else if errn.hasOver(uintptr(maxCount)) {
log.Fatalf("获取可用签名服务器失败次数超过 %v 次, 正在离线", maxCount)
}
if len(cs.URL) > 0 {
if cs != nil && len(cs.URL) > 0 {
log.Warnf("当前签名服务器 %v 不可用,正在查找可用服务器", cs.URL)
}
cs = asyncCheckServer(base.SignServers)
Expand Down

4 comments on commit 77b54fc

@Dreamail
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4da5d0]

goroutine 1 [running]:
github.com/Mrs4s/go-cqhttp/cmd/gocq.LoginInteract()
/build/cmd/gocq/main.go:170 +0x430
main.main()
/build/main.go:20 +0x28

@zzz6839
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

panic: runtime error: invalid memory address or nil pointer dereference
2023-08-29 18:34:09 [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x96c2ad]
2023-08-29 18:34:09 
2023-08-29 18:34:09 goroutine 1 [running]:
2023-08-29 18:34:09 github.com/Mrs4s/go-cqhttp/cmd/gocq.LoginInteract()
2023-08-29 18:34:09     /build/cmd/gocq/main.go:170 +0x48d
2023-08-29 18:34:09 main.main()
2023-08-29 18:34:09     /build/main.go:20 +0x2a

@YumeMichi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zzz6839
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dreamail @zzz6839 71c08f5

虽然但是,我docker镜像

Please sign in to comment.