Skip to content

Commit

Permalink
Fix NPE on Main Controller (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaldivia authored Jun 9, 2020
1 parent a1778d9 commit fdaa361
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/controller/cluster/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,12 @@ func (c *Controller) syncHandler(key string) error {

// Validate the MinIO Instance
if err = mi.Validate(); err != nil {
mi, err = c.updateMinIOInstanceStatus(ctx, mi, err.Error(), 0)
klog.V(2).Infof(err.Error())
var err2 error
mi, err2 = c.updateMinIOInstanceStatus(ctx, mi, err.Error(), 0)
if err2 != nil {
klog.V(2).Infof(err2.Error())
}
return err
}

Expand Down

0 comments on commit fdaa361

Please sign in to comment.