vcl/skia/win/gdiimpl.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 02c7a9bec769aaa0256bfe4ed8f9a323732e83b6 Author: Mike Kaganski <[email protected]> AuthorDate: Thu Dec 12 16:36:29 2024 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Dec 12 13:25:14 2024 +0100 Use correct object Fix an error in commit a1b18eba354dc773c214fc3b7ee92c3473ec4a5e (Implement Custom Font Collections on pre-Windows 10 systems, 2024-01-11), where the wrong object used in the call to CreateFontSetBuilder resulted in the empty return from the initializer, overwriting the just-created reference. Before commit 93350f4694ef8606150a95786c760bb2efd43979 (Drop pre-Win10 code from WinSkiaSalGraphicsImpl, 2024-12-07), it was checked, and the pre-Win10 path was used. After the said commit, it results in a nullptr dereference. Change-Id: Ia59f6ae6d236d1eb2c474f4330dcee6f38276c66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178357 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx index 2f257594b668..8de57dba2b89 100644 --- a/vcl/skia/win/gdiimpl.cxx +++ b/vcl/skia/win/gdiimpl.cxx @@ -56,8 +56,7 @@ getDWritePrivateFontCollection(IDWriteFontFace* fontFace) static sal::systools::COMReference<IDWriteFontSetBuilder> dwriteFontSetBuilder = [] { sal::systools::COMReference<IDWriteFontSetBuilder> builder; - sal::systools::ThrowIfFailed(dwriteFactory3->CreateFontSetBuilder(&dwriteFontSetBuilder), - SAL_WHERE); + sal::systools::ThrowIfFailed(dwriteFactory3->CreateFontSetBuilder(&builder), SAL_WHERE); return builder; }();
