From: lpsolit%gmail.com <> Date: Sat, 23 Dec 2006 02:10:21 +0000 (+0000) Subject: Bug 364743: Crash when renaming components (regression) - Patch by Frédéric Buclin... X-Git-Tag: bugzilla-2.23.4~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc185f7306838b9bdfd9963e1b0d6eb4f1b6b15b;p=thirdparty%2Fbugzilla.git Bug 364743: Crash when renaming components (regression) - Patch by Frédéric Buclin r/a=justdave --- diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index 1b2e8f8d28..a615e7ae50 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; }