Fix font map cache access creating invalid entries (and crashes)
This commit is contained in:
parent
4fefd95e0c
commit
25967b4a0f
|
@ -150,7 +150,10 @@ FONT* FONT::GetFont( const wxString& aFontName, bool aBold, bool aItalic )
|
|||
|
||||
std::tuple<wxString, bool, bool> key = { aFontName, aBold, aItalic };
|
||||
|
||||
FONT* font = s_fontMap[key];
|
||||
FONT* font = nullptr;
|
||||
|
||||
if( s_fontMap.find( key ) != s_fontMap.end() )
|
||||
font = s_fontMap[key];
|
||||
|
||||
if( !font )
|
||||
font = OUTLINE_FONT::LoadFont( aFontName, aBold, aItalic );
|
||||
|
|
Loading…
Reference in New Issue