1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-11 07:03:35 +03:00

fix fault on shutdown when using fontloader+freetype

This commit is contained in:
Wez Furlong 2019-02-19 06:38:21 -08:00
parent 6ffe4a3044
commit ad77709506

View File

@ -12,6 +12,14 @@ struct NamedFontImpl {
_fontdata: Vec<Vec<u8>>, _fontdata: Vec<Vec<u8>>,
} }
impl Drop for NamedFontImpl {
fn drop(&mut self) {
// Ensure that we drop the fonts before we drop the
// library, otherwise we will end up faulting
self.fonts.clear();
}
}
pub type FontSystemImpl = FontLoaderAndFreeType; pub type FontSystemImpl = FontLoaderAndFreeType;
pub struct FontLoaderAndFreeType {} pub struct FontLoaderAndFreeType {}
impl FontLoaderAndFreeType { impl FontLoaderAndFreeType {