Avoid warning at runtime about missing texture.
This commit is contained in:
@@ -68,8 +68,13 @@ void IconButtonWidget::add()
|
||||
}
|
||||
else if (m_icon_path_type == ICON_PATH_TYPE_RELATIVE)
|
||||
{
|
||||
std::string file = file_manager->getAsset(m_properties[PROP_ICON]);
|
||||
setTexture(irr_driver->getTexture(file));
|
||||
// Avoid warning about missing texture in case of e.g.
|
||||
// screenshot widget
|
||||
if(m_properties[PROP_ICON] != "")
|
||||
{
|
||||
std::string file = file_manager->getAsset(m_properties[PROP_ICON]);
|
||||
setTexture(irr_driver->getTexture(file));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user