Fix crash when GEVulkanTexture::getTextureData failed

This commit is contained in:
Benau 2022-08-01 00:59:43 +08:00
parent 83595d55a7
commit 331ae9a30f

View File

@ -438,6 +438,8 @@ void GEVulkanTexture::upload(uint8_t* data, bool generate_hq_mipmap)
void* GEVulkanTexture::lock(video::E_TEXTURE_LOCK_MODE mode, u32 mipmap_level)
{
uint8_t* texture_data = getTextureData();
if (!texture_data)
return NULL;
if (isSingleChannel())
{
m_locked_data = new uint8_t[m_size.Width * m_size.Height * 4]();