From: oetiker Date: Sun, 2 Mar 2008 15:38:05 +0000 (+0000) Subject: Fix error "cairo_restore without matching cairo_save" when zero-time point is out... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0daf0c83304ae994cb03a6d1b22fcf5be35d39e1;p=rrdtool-all.git 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@1301 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index 501db48d..56f509a6 100644 --- a/program/src/rrd_graph.c +++ b/program/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;