summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Assets/CustomTextureData.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-06-02 22:02:37 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2023-06-03 12:19:30 -0500
commit47c40d51dffe646465bb5bb8454c6143005859da (patch)
tree0a50f61b023aeb20a98a58414b2d6e35f0927811 /Source/Core/VideoCommon/Assets/CustomTextureData.cpp
parentd03e09c8fd911d1b4e66184ceedbeca989b75a0c (diff)
VideoCommon: when loading a PNG with no custom texture data levels already, create a level, this avoids a potential segfault
Diffstat (limited to 'Source/Core/VideoCommon/Assets/CustomTextureData.cpp')
-rw-r--r--Source/Core/VideoCommon/Assets/CustomTextureData.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp
index 26b65ad365..04183da3f0 100644
--- a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp
+++ b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp
@@ -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]]