Resource path was not shown in error message when texture could not be loaded
parent
ed72df1df9
commit
2cf7f3410e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue