Closed Bug 294784 Opened 19 years ago Closed 19 years ago

crash on unpaired restore()

Categories

(Core :: Graphics: Canvas2D, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ian, Unassigned)

References

()

Details

(Keywords: crash)

Attachments

(1 file)

restore(); lineWidth;

...crashes if you don't have a save().
Keywords: crash
i'm just adding some code to check and see if savecount > 0 before calling
cairo_restore since it doesn't do _any_ checking internally and will crash if
you call it before calling save...
Attachment #184006 - Flags: review?(vladimir)
Comment on attachment 184006 [details] [diff] [review]
keep track of saves/restores so we can avoid crashing...

Yeah, works for me.. I think this is actually fixed in CVS cairo as well
(tracking the state stack), but we should take this bandaid for now.

If the saveStack is == 0, we might want to just destroy mCairo and create it
again to reset the bits, but not necessary until we figure out what the deal is
with CVS cairo.
Attachment #184006 - Flags: review?(vladimir)
Attachment #184006 - Flags: review+
Attachment #184006 - Flags: approval1.8b2?
Comment on attachment 184006 [details] [diff] [review]
keep track of saves/restores so we can avoid crashing...

a=shaver, crashing sucks.
Attachment #184006 - Flags: approval1.8b2? → approval1.8b2+
checked in fix
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: