check that t.conf is not nil in loadConfig
This commit is contained in:
parent
8ce88095c6
commit
a0be330319
@ -247,10 +247,10 @@ func (t *Term) handleExit() (int, error) {
|
||||
func (t *Term) loadConfig() api.LoadConfig {
|
||||
r := api.LoadConfig{true, 1, 64, 64, -1}
|
||||
|
||||
if t.conf.MaxStringLen != nil {
|
||||
if t.conf != nil && t.conf.MaxStringLen != nil {
|
||||
r.MaxStringLen = *t.conf.MaxStringLen
|
||||
}
|
||||
if t.conf.MaxArrayValues != nil {
|
||||
if t.conf != nil && t.conf.MaxArrayValues != nil {
|
||||
r.MaxArrayValues = *t.conf.MaxArrayValues
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user