Skip to content

Commit

Permalink
go: cmd: sqlserver: Fix nil SIGSEGV on AutoGCBehavior read in init.
Browse files Browse the repository at this point in the history
  • Loading branch information
reltuk committed Feb 11, 2025
1 parent dc4b94d commit 9b53d20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/cmd/dolt/commands/sqlserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ func ConfigureServices(

InitAutoGCController := &svcs.AnonService{
InitF: func(context.Context) error {
if serverConfig.AutoGCBehavior().Enable() {
if serverConfig.AutoGCBehavior() != nil &&
serverConfig.AutoGCBehavior().Enable() {
config.AutoGCController = sqle.NewAutoGCController(lgr)
}
return nil
Expand Down

0 comments on commit 9b53d20

Please sign in to comment.