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($$$$$$) ...@@ -1656,8 +1656,12 @@ sub RecordImageHistory($$$$$$)
$req_type = $erole unless defined $req_type; $req_type = $erole unless defined $req_type;
my $osid = $osinfo->osid(); my $osid = $osinfo->osid();
my $osid_vers = $osinfo->vers(); my $osid_vers = $osinfo->vers();
my $imageid = $image->imageid(); my $imageid = 0;
my $version = $image->version(); my $version = 0;
if (defined($image)) {
$imageid = $image->imageid();
$version = $image->version();
}
next next
if ($impotent); if ($impotent);
......
Markdown is supported
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