fix - lack of testing for valid object creation

This commit is contained in:
Roy Johnson 2007-01-30 16:09:41 +00:00
parent 63376067ff
commit 30a0cda342
2 changed files with 5 additions and 0 deletions

View file

@ -450,6 +450,10 @@ sub getLineage {
$asset = $self;
} else {
$asset = WebGUI::Asset->new($self->session,$id, $class, $version);
if (!defined $asset) { # won't catch everything, but it will help some if an asset blows up
$self->session->errorHandler->error("AssetLineage::getLineage - failed to instanciate asset with assetId $id, className $class, and revision $version");
next;
}
}
} else {
$asset = $id;