mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoCommon: when loading a PNG with no custom texture data levels already, create a level, this avoids a potential segfault
This commit is contained in:
@ -515,11 +515,6 @@ bool LoadDDSTexture(CustomTextureData::Level* level, const std::string& filename
|
||||
info.first_mip_row_length, info.first_mip_size);
|
||||
}
|
||||
|
||||
bool LoadPNGTexture(CustomTextureData* texture, const std::string& filename)
|
||||
{
|
||||
return LoadPNGTexture(&texture->m_levels[0], filename);
|
||||
}
|
||||
|
||||
bool LoadPNGTexture(CustomTextureData::Level* level, const std::string& filename)
|
||||
{
|
||||
if (!level) [[unlikely]]
|
||||
|
Reference in New Issue
Block a user