free()/delete[] mismatch

This commit is contained in:
Flyinghead 2021-01-04 21:21:35 +01:00
parent 99bd8b4972
commit ac7bd2a6a0
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ void CustomTexture::LoaderThread()
texture->ComputeHash();
if (texture->custom_image_data != NULL)
{
delete [] texture->custom_image_data;
free(texture->custom_image_data);
texture->custom_image_data = NULL;
}
if (!texture->dirty)

View File

@ -414,7 +414,7 @@ bool BaseTextureCacheData::Delete()
lock_block = nullptr;
}
delete[] custom_image_data;
free(custom_image_data);
return true;
}
@ -735,7 +735,7 @@ void BaseTextureCacheData::CheckCustomTexture()
{
tex_type = TextureType::_8888;
UploadToGPU(custom_width, custom_height, custom_image_data, IsMipmapped(), false);
delete [] custom_image_data;
free(custom_image_data);
custom_image_data = NULL;
}
}