diff options
-rw-r--r-- | Bugzilla/Component.pm | 3 |
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; } |