mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed possible crash in sf::Font
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1364 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
2e40f341ba
commit
b6b423bd8f
@ -179,6 +179,10 @@ const Glyph& Font::GetGlyph(Uint32 codePoint, unsigned int characterSize, bool b
|
||||
////////////////////////////////////////////////////////////
|
||||
int Font::GetKerning(Uint32 first, Uint32 second, unsigned int characterSize) const
|
||||
{
|
||||
// Special case where first or second is 0 (null character)
|
||||
if (first == 0 || second == 0)
|
||||
return 0;
|
||||
|
||||
FT_Face face = static_cast<FT_Face>(myFace);
|
||||
|
||||
if (face && FT_HAS_KERNING(face) && SetCurrentSize(characterSize))
|
||||
|
Loading…
Reference in New Issue
Block a user