summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30552dd)
raw | patch | inline | side by side (parent: 30552dd)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 11 Jun 2007 16:14:40 +0000 (16:14 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 11 Jun 2007 16:14:40 +0000 (16:14 +0000) |
program/src/rrd_graph.c | patch | blob | history | |
program/src/rrd_graph.h | patch | blob | history |
index 6648d9ccd9fdcd7aaa6fb94e638de13a1fad2584..4af6f82a3f97307f47aac6ec7aa14515312879c2 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
image_desc_t *im)
{
unsigned long i, ii;
+ cairo_status_t status;
if (im == NULL)
return 0;
free(im->gdes[i].rpnp);
}
free(im->gdes);
- if (im->surface)
- cairo_surface_destroy(im->surface);
if (im->font_options)
cairo_font_options_destroy(im->font_options);
+
+ status = cairo_status (im->cr);
+
+ if (im->cr)
+ cairo_destroy(im->cr);
+ if (im->surface)
+ cairo_surface_destroy(im->surface);
+ if (status)
+ fprintf(stderr,"OOPS: Cairo has issuesm it can't even die: %s\n",
+ cairo_status_to_string (status));
+
return 0;
}
index 502fefe1b6573130337bc35fe2902595ca6a34e0..73c25d864444e132f04f96983039346e4d170de8 100644 (file)
--- a/program/src/rrd_graph.h
+++ b/program/src/rrd_graph.h
#define y1 cairo_y1
#define index cairo_index
+#include <cairo.h>
#include <cairo-pdf.h>
#include <cairo-svg.h>
#include <cairo-ps.h>