dmuratshin 9 years ago
parent
commit
2ee0f4bd4f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/ResFontFT.cpp

+ 2 - 0
src/ResFontFT.cpp

@@ -310,6 +310,8 @@ namespace oxygine
     const oxygine::Font* ResFontFT::getClosestFont(float worldScale, int styleFontSize, float& resScale) const
     const oxygine::Font* ResFontFT::getClosestFont(float worldScale, int styleFontSize, float& resScale) const
     {
     {
         int fontSize = styleFontSize * worldScale;
         int fontSize = styleFontSize * worldScale;
+        if (!fontSize)
+            return 0;
         if (fontSize > FT_SNAP_SIZE)
         if (fontSize > FT_SNAP_SIZE)
         {
         {
             int x = fontSize + FT_SNAP_SIZE - 1;
             int x = fontSize + FT_SNAP_SIZE - 1;