Commit 49bf5b5c authored by Mike Hibler's avatar Mike Hibler
Browse files

Watch out for null image object when recording history.

It appears that this was intentional and meant to denote a case
where the disk was not loaded. In Kevin's original code he set the
imageid to zero in this case. So we do the same (along with version=0).
parent e6453eb5
......@@ -1656,8 +1656,12 @@ sub RecordImageHistory($$$$$$)
$req_type = $erole unless defined $req_type;
my $osid = $osinfo->osid();
my $osid_vers = $osinfo->vers();
my $imageid = $image->imageid();
my $version = $image->version();
my $imageid = 0;
my $version = 0;
if (defined($image)) {
$imageid = $image->imageid();
$version = $image->version();
if ($impotent);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment