Fix null point error if server cfg is empty while doing cscli explain (#1096)
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
This commit is contained in:
parent
3c2462fbc5
commit
44d701a9dd
|
@ -250,7 +250,9 @@ func LoadConfig(cConfig *csconfig.Config) error {
|
|||
}
|
||||
|
||||
if flags.SingleFileType != "" && flags.OneShotDSN != "" {
|
||||
if cConfig.API != nil && cConfig.API.Server != nil {
|
||||
cConfig.API.Server.OnlineClient = nil
|
||||
}
|
||||
/*if the api is disabled as well, just read file and exit, don't daemonize*/
|
||||
if flags.DisableAPI {
|
||||
cConfig.Common.Daemonize = false
|
||||
|
|
Loading…
Reference in a new issue