drop the dummy surface prior to creating the real one
[rrdtool.git] / src / rrd_graph.c
index 8019d7f..6f1a1ac 100644 (file)
@@ -3059,6 +3059,7 @@ int graph_paint(
             (im->surface, CAIRO_SVG_VERSION_1_1);
         break;
     };
+    cairo_destroy(im->cr);
     im->cr = cairo_create(im->surface);
     cairo_set_antialias(im->cr, im->graph_antialias);
     cairo_scale(im->cr, im->zoom, im->zoom);