From fc185f7306838b9bdfd9963e1b0d6eb4f1b6b15b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 23 Dec 2006 02:10:21 +0000 Subject: Bug 364743: Crash when renaming components (regression) - Patch by Frédéric Buclin r/a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Component.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Component.pm') 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; } -- cgit v1.2.3-24-g4f1b