Browse Source

fix(settings): remove nil pointer exception

bergquist 9 năm trước cách đây
mục cha
commit
5dea0fda51
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      pkg/setting/setting.go

+ 2 - 2
pkg/setting/setting.go

@@ -359,12 +359,12 @@ func loadConfiguration(args *CommandLineArgs) {
 	configFiles = append(configFiles, defaultConfigFile)
 
 	Cfg, err = ini.Load(defaultConfigFile)
-	Cfg.BlockMode = false
-
 	if err != nil {
 		log.Fatal(3, "Failed to parse defaults.ini, %v", err)
 	}
 
+	Cfg.BlockMode = false
+
 	// command line props
 	commandLineProps := getCommandLineProperties(args.Args)
 	// load default overrides