Fix nullptr panic in pending containers.
Fix nullptr panic in pending containers.

Fixes #1289

Signed-off-by: Andrea Luzzardi <442ffe3ffbfd024afcf0b7f8b108d05bca3aae43@gmail.com>

MHBauer/swarm,troy0820/docker.github.io,auzias/swarm,anweiss/docker.github.io,kyhavlov/swarm,kyhavlov/swarm,shin-/docker.github.io,moxiegirl/swarm,allencloud/swarm,shubheksha/docker.github.io,johnstep/docker.github.io,gdevillele/docker.github.io,alexisbellido/docker.github.io,gdevillele/docker.github.io,BSWANG/denverdino.github.io,shin-/docker.github.io,menglingwei/denverdino.github.io,barais/swarm,BSWANG/swarm,anweiss/docker.github.io,qianzhangxa/swarm,docker-zh/docker.github.io,phiroict/docker,Spritekin/swarm,denverdino/docker.github.io,denverdino/denverdino.github.io,docker/docker.github.io,bsmr-docker/swarm,rillig/docker.github.io,alexisbellido/docker.github.io,gdevillele/docker.github.io,docker-zh/docker.github.io,jzwlqx/denverdino.github.io,thaJeztah/docker.github.io,sanscontext/docker.github.io,LuisBosquez/docker.github.io,londoncalling/docker.github.io,BSWANG/denverdino.github.io,shin-/docker.github.io,phiroict/docker,mgoelzer/swarm,docker-zh/docker.github.io,phiroict/docker,sfsmithcha/swarm,LukasBacigal/swarm,sanscontext/docker.github.io,CiaranCostello/swarm,CodeNow/swarm,echupriyanov/swarm,rchicoli/swarm,LuisBosquez/docker.github.io,johnstep/docker.github.io,jimmycmh/swarm,fugr/swarm,BSWANG/swarm,docker/docker.github.io,aduermael/docker.github.io,xFragger/swarm,docker/docker.github.io,shin-/docker.github.io,denverdino/docker.github.io,johnstep/docker.github.io,thaJeztah/docker.github.io,aduermael/docker.github.io,allencloud/swarm,bdwill/docker.github.io,aduermael/docker.github.io,shubheksha/docker.github.io,denverdino/docker.github.io,doronp/swarm,troy0820/docker.github.io,xFragger/swarm,sanscontext/docker.github.io,atlassian/swarm,menglingwei/denverdino.github.io,phiroict/docker,joeuo/docker.github.io,denverdino/docker.github.io,shubheksha/docker.github.io,denverdino/denverdino.github.io,auzias/swarm,londoncalling/docker.github.io,docker/docker.github.io,liubin/swarm,sanscontext/docker.github.io,CiaranCostello/swarm,londoncalling/docker.github.io,thaJeztah/docker.github.io,joeuo/docker.github.io,resouer/swarm,Spritekin/swarm,MHBauer/swarm,joaofnfernandes/docker.github.io,denverdino/denverdino.github.io,kunalkushwaha/swarm,troy0820/docker.github.io,ch3lo/swarm,jzwlqx/denverdino.github.io,riuvshin/swarm,morpheyesh/swarm,resouer/swarm,menglingwei/denverdino.github.io,denverdino/denverdino.github.io,rillig/docker.github.io,joeuo/docker.github.io,swarm-hooks/swarm,alexisbellido/docker.github.io,JimGalasyn/docker.github.io,danix800/docker.github.io,joaofnfernandes/docker.github.io,echupriyanov/swarm,joaofnfernandes/docker.github.io,joaofnfernandes/docker.github.io,danix800/docker.github.io,alexisbellido/docker.github.io,rchicoli/swarm,docker-zh/docker.github.io,shin-/docker.github.io,kunalkushwaha/swarm,danix800/docker.github.io,gradywang/swarm,troy0820/docker.github.io,JimGalasyn/docker.github.io,LuisBosquez/docker.github.io,fugr/swarm,linecheng/swarm,jzwlqx/denverdino.github.io,aduermael/docker.github.io,bdwill/docker.github.io,menglingwei/denverdino.github.io,bdwill/docker.github.io,mgoelzer/swarm,denverdino/denverdino.github.io,rillig/docker.github.io,cpuguy83/swarm,joaofnfernandes/docker.github.io,ezrasilvera/swarm,BSWANG/denverdino.github.io,johnstep/docker.github.io,shubheksha/docker.github.io,JimGalasyn/docker.github.io,JimGalasyn/docker.github.io,gradywang/swarm,atlassian/swarm,londoncalling/docker.github.io,rillig/docker.github.io,swarm-hooks/swarm,schmunk42/swarm,BSWANG/denverdino.github.io,jzwlqx/denverdino.github.io,BSWANG/denverdino.github.io,LukasBacigal/swarm,megamsys/swarm,cpuguy83/swarm,thaJeztah/docker.github.io,jzwlqx/denverdino.github.io,denverdino/docker.github.io,joeuo/docker.github.io,alexisbellido/docker.github.io,moxiegirl/swarm,danix800/docker.github.io,qianzhangxa/swarm,jimmycmh/swarm,docker/docker.github.io,doronp/swarm,morpheyesh/swarm,riuvshin/swarm,rancher/swarm,sanscontext/docker.github.io,joeuo/docker.github.io,ezrasilvera/swarm,shubheksha/docker.github.io,thaJeztah/docker.github.io,phiroict/docker,LuisBosquez/docker.github.io,sfsmithcha/swarm,bdwill/docker.github.io,megamsys/swarm,londoncalling/docker.github.io,anweiss/docker.github.io,LuisBosquez/docker.github.io,bsmr-docker/swarm,menglingwei/denverdino.github.io,barais/swarm,johnstep/docker.github.io,gdevillele/docker.github.io,schmunk42/swarm,linecheng/swarm,rancher/swarm,docker-zh/docker.github.io,JimGalasyn/docker.github.io,bdwill/docker.github.io,CodeNow/swarm,liubin/swarm,anweiss/docker.github.io,anweiss/docker.github.io,gdevillele/docker.github.io,ch3lo/swarm