From 5f5a3cb3daeff520d82a33cb917ecce518709051 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 27 Mar 2025 13:30:50 -0400 Subject: [PATCH] fix: Don't dereference null surface props --- src/c/sk_image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c/sk_image.cpp b/src/c/sk_image.cpp index 903217491fab..27854fe94e45 100644 --- a/src/c/sk_image.cpp +++ b/src/c/sk_image.cpp @@ -60,7 +60,7 @@ sk_image_t* sk_image_new_from_picture(sk_picture_t* picture, const sk_isize_t* d if (cmatrix) { m = AsMatrix(cmatrix); } - return ToImage(SkImages::DeferredFromPicture(sk_ref_sp(AsPicture(picture)), *AsISize(dimensions), cmatrix ? &m : nullptr, AsPaint(paint), useFloatingPointBitDepth ? SkImages::BitDepth::kF16 : SkImages::BitDepth::kU8, sk_ref_sp(AsColorSpace(colorSpace)), *AsSurfaceProps(props)).release()); + return ToImage(SkImages::DeferredFromPicture(sk_ref_sp(AsPicture(picture)), *AsISize(dimensions), cmatrix ? &m : nullptr, AsPaint(paint), useFloatingPointBitDepth ? SkImages::BitDepth::kF16 : SkImages::BitDepth::kU8, sk_ref_sp(AsColorSpace(colorSpace)), props ? (*AsSurfaceProps(props)).release()) : {}); } int sk_image_get_width(const sk_image_t* cimage) {