aboutsummaryrefslogtreecommitdiff
path: root/graphics/fonts
diff options
context:
space:
mode:
authorBastien Bouclet2017-11-14 06:38:10 +0100
committerBastien Bouclet2017-11-14 06:41:06 +0100
commit65d098436446b464ba4095131dccf6cff05aecc4 (patch)
tree90504719ef03c8a572a3571448b41abd01c49ae6 /graphics/fonts
parent327dcf98ec7ec520bba5319087affa693d91c87d (diff)
downloadscummvm-rg350-65d098436446b464ba4095131dccf6cff05aecc4.tar.gz
scummvm-rg350-65d098436446b464ba4095131dccf6cff05aecc4.tar.bz2
scummvm-rg350-65d098436446b464ba4095131dccf6cff05aecc4.zip
GRAPHICS: Fix freeing invalid pointers in the BDF font destructor
Fixes a crash on exit when using a non default GUI font. Possibly fixes #10318.
Diffstat (limited to 'graphics/fonts')
-rw-r--r--graphics/fonts/bdf.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp
index 00e98316d6..71911d2ac4 100644
--- a/graphics/fonts/bdf.cpp
+++ b/graphics/fonts/bdf.cpp
@@ -694,6 +694,8 @@ BdfFont *BdfFont::loadFromCache(Common::SeekableReadStream &stream) {
data.bitmaps = bitmaps;
data.advances = advances;
data.boxes = boxes;
+ data.familyName = nullptr;
+ data.slant = nullptr;
return new BdfFont(data, DisposeAfterUse::YES);
}