Fix QEMU migration cookie crash for guests with no graphics
Fix QEMU migration cookie crash for guests with no graphics

When generating a cookie for a guest with no data, the
QEMU_MIGRATION_COOKIE_GRAPHICS flag was set even if no
graphics data was added. Avoid setting the flag unless
it was needed, also add a safety check for mig->graphics
being non-NULL

* src/qemu/qemu_migration.c: Avoid cookie crash for guest
  with no graphics

elmarco/libvirt,novel/fbsd-libvirt,cbosdo/libvirt,datto/libvirt,andreabolognani/libvirt,cbosdo/libvirt,rlaager/libvirt,zippy2/libvirt,zippy2/libvirt,dumbbell/libvirt,iam-TJ/libvirt,shugaoye/libvirt,warewolf/libvirt,fabianfreyer/libvirt,jeckersb/libvirt,trainstack/libvirt,rlaager/libvirt,jeckersb/libvirt,usc-isi/libvirt,bjzhang/libvirt,rmarwaha/libvirt1,VenkatDatta/libvirt,taget/libvirt,emaste/libvirt,olafhering/libvirt,datto/libvirt,iam-TJ/libvirt,warewolf/libvirt,datto/libvirt,danwent/libvirt-ovs,siboulet/libvirt-openvz,rlaager/libvirt,rmarwaha/libvirt1,emaste/libvirt,danwent/libvirt-ovs,wiedi/libvirt,emaste/libvirt,cbosdo/libvirt,olafhering/libvirt,iam-TJ/libvirt,rmarwaha/libvirt1,warewolf/libvirt,novel/fbsd-libvirt,rlaager/libvirt,jardasgit/libvirt,jeckersb/libvirt,agx/libvirt,agx/libvirt,jfehlig/libvirt,wiedi/libvirt,jfehlig/libvirt,zhlcindy/libvirt-1.1.4-maintain,usc-isi/libvirt,trainstack/libvirt,soulxu/libvirt-xuhj,andreabolognani/libvirt,wiedi/libvirt,VenkatDatta/libvirt,bjzhang/libvirt,shugaoye/libvirt,emaste/libvirt,soulxu/libvirt-xuhj,cbosdo/libvirt,nertpinx/libvirt,rmarwaha/libvirt1,novel/fbsd-libvirt,nertpinx/libvirt,soulxu/libvirt-xuhj,rmarwaha/libvirt1,zhlcindy/libvirt-1.1.4-maintain,jeckersb/libvirt,elmarco/libvirt,taget/libvirt,novel/fbsd-libvirt,bjzhang/libvirt,andreabolognani/libvirt,crobinso/libvirt,rmarwaha/libvirt,iam-TJ/libvirt,wiedi/libvirt,foomango/libvirt,fabianfreyer/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,kantai/libvirt-vfork,VenkatDatta/libvirt,rmarwaha/libvirt1,leilihh/libvirt,warewolf/libvirt,jeckersb/libvirt,datto/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,usc-isi/libvirt,rmarwaha/libvirt,foomango/libvirt,leilihh/libvirt,novel/fbsd-libvirt,leilihh/libvirt,elmarco/libvirt,jfehlig/libvirt,andreabolognani/libvirt,zhlcindy/libvirt-1.1.4-maintain,dumbbell/libvirt,rmarwaha/libvirt,crobinso/libvirt,rmarwaha/libvirt,leilihh/libvirt,leilihh/libvirt,taget/libvirt,zippy2/libvirt,agx/libvirt,olafhering/libvirt,trainstack/libvirt,jardasgit/libvirt,siboulet/libvirt-openvz,foomango/libvirt,warewolf/libvirt,warewolf/libvirt,dumbbell/libvirt,andreabolognani/libvirt,dumbbell/libvirt,taget/libvirt,libvirt/libvirt,trainstack/libvirt,jeckersb/libvirt,eskultety/libvirt,trainstack/libvirt,leilihh/libvirt,eskultety/libvirt,emaste/libvirt,agx/libvirt,wiedi/libvirt,kantai/libvirt-vfork,foomango/libvirt,wiedi/libvirt,trainstack/libvirt,olafhering/libvirt,kantai/libvirt-vfork,shugaoye/libvirt,foomango/libvirt,agx/libvirt,rmarwaha/libvirt,jardasgit/libvirt,eskultety/libvirt,VenkatDatta/libvirt,jfehlig/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,wiedi/libvirt,libvirt/libvirt,novel/fbsd-libvirt,eskultety/libvirt,datto/libvirt,crobinso/libvirt,emaste/libvirt,danwent/libvirt-ovs,bjzhang/libvirt,fabianfreyer/libvirt,trainstack/libvirt,jeckersb/libvirt,eskultety/libvirt,emaste/libvirt,rlaager/libvirt,warewolf/libvirt,kantai/libvirt-vfork,soulxu/libvirt-xuhj,crobinso/libvirt,libvirt/libvirt,rmarwaha/libvirt,kantai/libvirt-vfork,elmarco/libvirt,zippy2/libvirt,danwent/libvirt-ovs,usc-isi/libvirt,soulxu/libvirt-xuhj,taget/libvirt,novel/fbsd-libvirt,novel/fbsd-libvirt,nertpinx/libvirt,libvirt/libvirt,siboulet/libvirt-openvz,iam-TJ/libvirt,fabianfreyer/libvirt,iam-TJ/libvirt,nertpinx/libvirt,danwent/libvirt-ovs,elmarco/libvirt,siboulet/libvirt-openvz,iam-TJ/libvirt,dumbbell/libvirt,jardasgit/libvirt,shugaoye/libvirt,novel/fbsd-libvirt,fabianfreyer/libvirt,dumbbell/libvirt,usc-isi/libvirt,siboulet/libvirt-openvz,bjzhang/libvirt,shugaoye/libvirt