#! /bin/sh /usr/share/dpatch/dpatch-run
## 536876.dpatch by Hendrik Frenzel <hfrenzel@scunc.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad nagiosgrapher-1.7.1~/sbin/rrd2-graph.cgi.in nagiosgrapher-1.7.1/sbin/rrd2-graph.cgi.in
--- nagiosgrapher-1.7.1~/sbin/rrd2-graph.cgi.in	2008-12-18 10:27:55.000000000 +0100
+++ nagiosgrapher-1.7.1/sbin/rrd2-graph.cgi.in	2010-02-18 16:57:51.000000000 +0100
@@ -540,7 +540,7 @@
 
 					# parsing the description
 					my $description = $_->{print_description};
-					$description =~ s/:/\\:/;
+					$description =~ s/:/\\:/ if (defined $description);
 
 					# setting up end-of-line
 					$eol = '';
@@ -548,7 +548,7 @@
 						$eol = $ng->format_eol( $_->{print_eol} );
 					}
 
-					$repeat = 1;
+					$repeat = 0;
 					$repeat = $_->{print_repeat} + 1
 					  if ( exists( $_->{print_repeat} ) );
 
