summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/TrackingFlags')
-rw-r--r--extensions/TrackingFlags/Extension.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/extensions/TrackingFlags/Extension.pm b/extensions/TrackingFlags/Extension.pm
index ea53e1e0f..5a4b24611 100644
--- a/extensions/TrackingFlags/Extension.pm
+++ b/extensions/TrackingFlags/Extension.pm
@@ -68,12 +68,14 @@ sub template_before_process {
# note: bug/edit.html.tmpl doesn't support multiple bugs
my $bug = exists $vars->{'bugs'} ? $vars->{'bugs'}[0] : $vars->{'bug'};
- $vars->{'tracking_flags'} = Bugzilla::Extension::TrackingFlags::Flag->match({
- product => $bug->product,
- component => $bug->component,
- bug_id => $bug->id,
- is_active => 1,
- });
+ if ($bug) {
+ $vars->{'tracking_flags'} = Bugzilla::Extension::TrackingFlags::Flag->match({
+ product => $bug->product,
+ component => $bug->component,
+ bug_id => $bug->id,
+ is_active => 1,
+ });
+ }
$vars->{'tracking_flag_types'} = FLAG_TYPES;
}