poppler/CairoOutputDev.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
New commits: commit 59853762c541539ca99bdab610c7649a2d3d6c3c Author: Carlos Garcia Campos <[email protected]> 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) { _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
