Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion librtt/Display/Rtt_TextureFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,13 @@ TextureFactory::FindOrCreate(
if ( result.IsNull() )
{
PlatformBitmap *bitmap = CreateBitmap( filePath.GetString(), flags, isMask );
result = CreateAndAdd( key, bitmap, true, isRetina );

if ( bitmap )
{
result = CreateAndAdd( key, bitmap, true, isRetina );
} else {
Rtt_ASSERT( result.IsNull() );
}
}

return result;
Expand Down
4 changes: 4 additions & 0 deletions platform/emscripten/Rtt_EmscriptenBitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ namespace Rtt
{
fFormat = kRGBA;
}
else
{
Rtt_LogException("Failed to load %s\n", path);
}
}
else
if (ext == ".png")
Expand Down
4 changes: 4 additions & 0 deletions platform/linux/src/Rtt_LinuxBitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ namespace Rtt
{
fFormat = kRGBA;
}
else
{
Rtt_LogException("Failed to load %s\n", path);
}
}
else if (ext == ".png")
{
Expand Down
2 changes: 2 additions & 0 deletions platform/shared/Rtt_BitmapUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ namespace bitmapUtil
format = Rtt::PlatformBitmap::Format::kRGBA;
return im;
}

return NULL;
}

//
Expand Down