]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 364743: Crash when renaming components (regression) - Patch by Frédéric Buclin...
authorlpsolit%gmail.com <>
Sat, 23 Dec 2006 02:10:21 +0000 (02:10 +0000)
committerlpsolit%gmail.com <>
Sat, 23 Dec 2006 02:10:21 +0000 (02:10 +0000)
Bugzilla/Component.pm

index 1b2e8f8d28b6f168df9114b00d807d24385bf0e4..a615e7ae507594be3a5e2e9ebd8bcf743308e106 100644 (file)
@@ -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;
 }