summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Component.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-12-23 03:10:21 +0100
committerlpsolit%gmail.com <>2006-12-23 03:10:21 +0100
commitfc185f7306838b9bdfd9963e1b0d6eb4f1b6b15b (patch)
treeb56bdd7ab48104081b4ed777343b0f3c723d45d2 /Bugzilla/Component.pm
parent99cbf8f5ff129558390942a759e9d872c24012c9 (diff)
downloadbugzilla-fc185f7306838b9bdfd9963e1b0d6eb4f1b6b15b.tar.gz
bugzilla-fc185f7306838b9bdfd9963e1b0d6eb4f1b6b15b.tar.xz
Bug 364743: Crash when renaming components (regression) - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=justdave
Diffstat (limited to 'Bugzilla/Component.pm')
-rw-r--r--Bugzilla/Component.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm
index 1b2e8f8d2..a615e7ae5 100644
--- a/Bugzilla/Component.pm
+++ b/Bugzilla/Component.pm
@@ -74,7 +74,8 @@ sub new {
unshift @_, $param;
my $component = $class->SUPER::new(@_);
- $component->{product} = $product if $product;
+ # Add the product object as attribute only if the component exists.
+ $component->{product} = $product if ($component && $product);
return $component;
}