Fixed drawText() to handle NULL or empty string.

This commit is contained in:
Dario Manesku 2014-08-06 08:23:54 +01:00
parent 52afe0f433
commit 1391939151

View file

@ -1635,6 +1635,12 @@ struct Imgui
void drawText(float _x, float _y, const char* _text, ImguiTextAlign::Enum _align, uint32_t _abgr)
{
if (NULL == _text
|| '\0' == _text[0])
{
return;
}
#if USE_NANOVG_FONT
static uint32_t textAlign[ImguiTextAlign::Count] =
{