Commit 500a87af authored by Jeff Muizelaar's avatar Jeff Muizelaar

2007-09-01 Jeff Muizelaar <jeff@infidigm.net>

	* poppler/CairoOutputDev.cc:
	* poppler/Error.cc:
	* poppler/Error.h: Report any cairo errors when destroying the cairo
	context.
parent 0c22556b
2007-09-01 Jeff Muizelaar <jeff@infidigm.net>
* poppler/CairoOutputDev.cc:
* poppler/Error.cc:
* poppler/Error.h: Report any cairo errors when destroying the cairo
context.
2007-09-01 Jeff Muizelaar <jeff@infidigm.net>
* glib/demo/Makefile.am: Only build the demo app if the cflags will be
......
......@@ -103,8 +103,13 @@ CairoOutputDev::~CairoOutputDev() {
void CairoOutputDev::setCairo(cairo_t *cairo)
{
if (this->cairo != NULL)
if (this->cairo != NULL) {
cairo_status_t status = cairo_status (this->cairo);
if (status) {
warning("cairo context error: %s\n", cairo_status_to_string(status));
}
cairo_destroy (this->cairo);
}
if (cairo != NULL) {
this->cairo = cairo_reference (cairo);
/* save the initial matrix so that we can use it for type3 fonts. */
......
......@@ -47,3 +47,10 @@ void CDECL error(int pos, char *msg, ...) {
(*errorFunction)(pos, msg, args);
va_end(args);
}
void warning(char *msg, ...) {
va_list args;
va_start(args, msg);
vprintf(msg, args);
va_end(args);
}
......@@ -17,6 +17,7 @@
#include "poppler-config.h"
extern void CDECL error(int pos, char *msg, ...) GCC_PRINTF_FORMAT (2, 3);
void warning(char *msg, ...) GCC_PRINTF_FORMAT (1, 2);
void setErrorFunction(void (* f)(int , char *, va_list args));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment