Begin: moved tooltip position code in an else block. Misc comments

This commit is contained in:
omar
2018-04-10 16:51:16 +02:00
parent 52cac135c9
commit 928a4ad315
2 changed files with 6 additions and 7 deletions

View File

@ -1733,7 +1733,7 @@ bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
IM_ASSERT(cfg.DstFont && (!cfg.DstFont->IsLoaded() || cfg.DstFont->ContainerAtlas == atlas));
const int font_offset = stbtt_GetFontOffsetForIndex((unsigned char*)cfg.FontData, cfg.FontNo);
IM_ASSERT(font_offset >= 0);
IM_ASSERT(font_offset >= 0 && "FontData is incorrect, or FontNo cannot be found.");
if (!stbtt_InitFont(&tmp.FontInfo, (unsigned char*)cfg.FontData, font_offset))
{
atlas->TexWidth = atlas->TexHeight = 0; // Reset output on failure