[poppler] Branch 'poppler-0.12' - poppler/CairoOutputDev.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Fri Nov 27 06:27:02 PST 2009
poppler/CairoOutputDev.cc | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 59853762c541539ca99bdab610c7649a2d3d6c3c
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Fri Nov 27 15:23:11 2009 +0100
[cairo] Revert commit 119071cb9a6144b6268a7ff9b6341ad0cc75d9ae
And fix bug #24575 jut by checking pointer is not null before using it.
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index c7e5466..25d4167 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -256,10 +256,6 @@ void CairoOutputDev::saveState(GfxState *state) {
void CairoOutputDev::restoreState(GfxState *state) {
LOG(printf ("restore\n"));
- if (!state->hasSaves()) {
- error(-1, "restoreState on an empty state stack");
- return;
- }
cairo_restore (cairo);
if (cairo_shape)
cairo_restore (cairo_shape);
@@ -276,9 +272,11 @@ void CairoOutputDev::restoreState(GfxState *state) {
if (mask)
cairo_pattern_destroy(mask);
- mask = ms->mask;
- maskStack = ms->next;
- delete ms;
+ if (ms) {
+ mask = ms->mask;
+ maskStack = ms->next;
+ delete ms;
+ }
}
void CairoOutputDev::updateAll(GfxState *state) {
More information about the poppler
mailing list