We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 259d1b7 commit e798491Copy full SHA for e798491
src/CanvasRenderingContext2d.cc
@@ -233,8 +233,10 @@ Context2d::save() {
233
234
void
235
Context2d::restore() {
236
- cairo_restore(_context);
237
- restoreState();
+ if (stateno > 0) {
+ cairo_restore(_context);
238
+ restoreState();
239
+ }
240
}
241
242
/*
@@ -258,7 +260,6 @@ Context2d::saveState() {
258
260
259
261
262
Context2d::restoreState() {
- if (0 == stateno) return;
263
// Olaf (2011-02-21): Free old state data
264
#if HAVE_PANGO
265
free(states[stateno]->fontFamily);
0 commit comments