mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00: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:
parent
d03e09c8fd
commit
47c40d51df
3 changed files with 5 additions and 8 deletions
|
@ -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]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue