From f9f06f54dd1a66350afd42f6eec761565a4d3d77 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 12 Dec 2024 21:23:46 +0100 Subject: added pattern removal on exception --- src/crepe/facade/SDLFontContext.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/crepe/facade/SDLFontContext.cpp b/src/crepe/facade/SDLFontContext.cpp index 4fb0e88..851016b 100644 --- a/src/crepe/facade/SDLFontContext.cpp +++ b/src/crepe/facade/SDLFontContext.cpp @@ -37,6 +37,7 @@ unique_ptr SDLFontContext::get_font_asset(const string & font_family) { FcPatternDestroy(pattern); if (!matched_pattern) { + FcPatternDestroy(matched_pattern); throw runtime_error("No matching font found."); } -- cgit v1.2.3