aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLFontContext.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-12 21:23:46 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-12 21:23:46 +0100
commitf9f06f54dd1a66350afd42f6eec761565a4d3d77 (patch)
tree34c5addc1d10047818734d573df9974792978106 /src/crepe/facade/SDLFontContext.cpp
parent1658c71bb7d3676699e9519131d6ea542e74fc83 (diff)
added pattern removal on exception
Diffstat (limited to 'src/crepe/facade/SDLFontContext.cpp')
-rw-r--r--src/crepe/facade/SDLFontContext.cpp1
1 files changed, 1 insertions, 0 deletions
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<Asset> SDLFontContext::get_font_asset(const string & font_family) {
FcPatternDestroy(pattern);
if (!matched_pattern) {
+ FcPatternDestroy(matched_pattern);
throw runtime_error("No matching font found.");
}