Resource path was not shown in error message when texture could not be loaded

0.8
Bruno Van de Velde 2017-09-09 01:53:59 +02:00
parent ed72df1df9
commit 2cf7f3410e
1 changed files with 8 additions and 3 deletions

View File

@ -152,12 +152,17 @@ namespace tgui
#else
if (id[0] != '/')
#endif
{
data = m_textureLoader(*this, getResourcePath() + id, partRect);
if (!data)
throw Exception{"Failed to load '" + getResourcePath() + id + "'"};
}
else
{
data = m_textureLoader(*this, id, partRect);
if (!data)
throw Exception{"Failed to load '" + id + "'"};
if (!data)
throw Exception{"Failed to load '" + id + "'"};
}
m_id = id;
setTextureData(data, middleRect);