fix(region): check whether guest is nil

This commit is contained in:
rainzm
2021-03-04 17:54:52 +08:00
parent 0f591c3a4f
commit 23328aa12b
+1 -1
View File
@@ -239,7 +239,7 @@ func (self *SInstanceSnapshot) getMoreDetails(userCred mcclient.TokenCredential,
out.StorageType = snapshots[i].GetStorageType()
}
}
} else {
} else if guest != nil {
out.Size = self.SizeMb
disk, err := guest.GetSystemDisk()
if err != nil {