From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Fri, 4 Dec 2009 18:45:48 +0000 (+0000)
Subject: patch from Steve Callendar to protect against report output failure when trying to... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4faf7d45c0cd6d10147c4e5b1ad75f807b93a04c;p=contrib%2FConifer.git

patch from Steve Callendar to protect against report output failure when trying to draw a line graph with no datasets

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15083 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/src/reporter/clark-kent.pl b/Open-ILS/src/reporter/clark-kent.pl
index 9800a9ce75..d917eec437 100755
--- a/Open-ILS/src/reporter/clark-kent.pl
+++ b/Open-ILS/src/reporter/clark-kent.pl
@@ -782,6 +782,8 @@ sub draw_lines {
 		
 	}
 
+	return [] unless ($new_data[0] && @{$new_data[0]});
+
 	for my $col (@use_me) {
 		push @leg, $r->{column_labels}->[$values[$col - 1]];
 	}