Skip to content

Commit 2aab6fa

Browse files
authored
Merge pull request #38 from artemseleznev/master
static analyzer issue fix
2 parents b16ed90 + 846117a commit 2aab6fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func flattenComposite(errs *CompositeError) *CompositeError {
112112
for _, er := range errs.Errors {
113113
switch e := er.(type) {
114114
case *CompositeError:
115-
if len(e.Errors) > 0 {
115+
if e != nil && len(e.Errors) > 0 {
116116
flat := flattenComposite(e)
117117
if len(flat.Errors) > 0 {
118118
res = append(res, flat.Errors...)

0 commit comments

Comments
 (0)