diff --git a/mozilla/webtools/bugzilla/Bugzilla/Component.pm b/mozilla/webtools/bugzilla/Bugzilla/Component.pm index 1b2e8f8d28b..a615e7ae507 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Component.pm +++ b/mozilla/webtools/bugzilla/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; }