Skip to content

Commit

Permalink
deployment: fix nil pointer panic
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedanese committed Jan 16, 2016
1 parent 936c8cd commit 78d27a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/deployment/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 78d27a5

Please sign in to comment.