From cf3eec070106f426cffea72f894ae3f4321956f5 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 2 Mar 2008 15:38:05 +0000 Subject: [PATCH] Fix error "cairo_restore without matching cairo_save" when zero-time point is out of graph git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1301 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_graph.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 501db48..56f509a 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -3346,6 +3346,7 @@ int graph_paint( case GF_HRULE: if (im->gdes[i].yrule >= im->minval && im->gdes[i].yrule <= im->maxval) + { cairo_save(im->cr); if (im->gdes[i].dash) { cairo_set_dash(im->cr, im->gdes[i].p_dashes, @@ -3358,10 +3359,12 @@ int graph_paint( 1.0, im->gdes[i].col); cairo_stroke(im->cr); cairo_restore(im->cr); + } break; case GF_VRULE: if (im->gdes[i].xrule >= im->start && im->gdes[i].xrule <= im->end) + { cairo_save(im->cr); if (im->gdes[i].dash) { cairo_set_dash(im->cr, im->gdes[i].p_dashes, @@ -3373,6 +3376,7 @@ int graph_paint( im->yorigin - im->ysize, 1.0, im->gdes[i].col); cairo_stroke(im->cr); cairo_restore(im->cr); + } break; default: break; -- 2.30.2