Skip to content

Commit cf6b80f

Browse files
authored
Merge branch 'Automattic:master' into reject-null-for-loadImage
2 parents 783ebae + a862af8 commit cf6b80f

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ project adheres to [Semantic Versioning](http://semver.org/).
1212
### Fixed
1313
* fix: reject loadImage when src is null or invalid
1414

15+
3.1.2
16+
==================
17+
### Fixed
18+
* Fix crash when setting width/height on PDF, SVG canvas (#2520)
19+
1520
3.1.1
1621
==================
1722
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "canvas",
33
"description": "Canvas graphics API backed by Cairo",
4-
"version": "3.1.1",
4+
"version": "3.1.2",
55
"author": "TJ Holowaychuk <[email protected]>",
66
"main": "index.js",
77
"browser": "browser.js",

src/backend/PdfBackend.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ cairo_surface_t* PdfBackend::ensureSurface() {
2222

2323
void PdfBackend::destroySurface() {
2424
if (surface) {
25+
cairo_surface_finish(surface);
2526
cairo_surface_destroy(surface);
2627
surface = nullptr;
2728
assert(_closure);

src/backend/SvgBackend.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ cairo_surface_t* SvgBackend::ensureSurface() {
2626

2727
void SvgBackend::destroySurface() {
2828
if (surface) {
29+
cairo_surface_finish(surface);
2930
cairo_surface_destroy(surface);
3031
surface = nullptr;
3132
assert(_closure);

0 commit comments

Comments
 (0)