check for texture path existence on load
This commit is contained in:
parent
55d6e08480
commit
cdd01672c3
|
@ -42,7 +42,21 @@ void Texture::load()
|
|||
{
|
||||
if (!path.empty())
|
||||
{
|
||||
load(path);
|
||||
#if !defined(__ANDROID__)
|
||||
/* Can't check for file existence in an Android APK */
|
||||
if (fs::exists(path))
|
||||
{
|
||||
#endif
|
||||
load(path);
|
||||
#if !defined(__ANDROID__)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Error loading texture path: " << path;
|
||||
sb::Log::log(message, sb::Log::ERROR);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue