From 78d27a5d2fef3501c8fd1579fe3b52192920986b Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Fri, 15 Jan 2016 17:58:01 -0800 Subject: [PATCH] deployment: fix nil pointer panic --- pkg/controller/deployment/deployment_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 395658d5db4..e262898a959 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -196,7 +196,7 @@ func (dc *DeploymentController) Run(workers int, stopCh <-chan struct{}) { func (dc *DeploymentController) addRC(obj interface{}) { rc := obj.(*api.ReplicationController) glog.V(4).Infof("Replication controller %s added.", rc.Name) - if d := dc.getDeploymentForRC(rc); rc != nil { + if d := dc.getDeploymentForRC(rc); d != nil { dKey, err := controller.KeyFunc(d) if err != nil { glog.Errorf("Couldn't get key for deployment controller %#v: %v", d, err)