diff -Nurp ./libvirt.orig/src/security_selinux.c ./libvirt/src/security_selinux.c
--- ./libvirt.orig/src/security_selinux.c	2009-09-02 14:34:08.000000000 -0500
+++ ./libvirt/src/security_selinux.c	2009-09-08 15:32:22.000000000 -0500
@@ -364,6 +365,11 @@ SELinuxRestoreSecurityImageLabel(virConn
     char *newpath = NULL;
     const char *path = disk->src;
 
+    if (&vm->def->seclabel == NULL)  {
+        virSecurityReportError(conn, VIR_ERR_ERROR, _("seclabel is NULL"));
+        return rc;
+    }
+
     /* Don't restore labels on readoly/shared disks, because
      * other VMs may still be accessing these
      * Alternatively we could iterate over all running
