renderer: clear texture cache after deleting interlace texture

This commit is contained in:
itsmattkc
2022-07-26 12:50:16 -07:00
parent a09d2f41e9
commit 66152b4aa3
+5 -5
View File
@@ -109,11 +109,6 @@ QVariant Renderer::GetDefaultShader()
void Renderer::Destroy()
{
for (auto it=texture_cache_.begin(); it!=texture_cache_.end(); it++) {
DestroyNativeTexture(it->handle);
}
texture_cache_.clear();
if (!default_shader_.isNull()) {
DestroyNativeShader(default_shader_);
default_shader_.clear();
@@ -126,6 +121,11 @@ void Renderer::Destroy()
interlace_texture_.clear();
}
for (auto it=texture_cache_.begin(); it!=texture_cache_.end(); it++) {
DestroyNativeTexture(it->handle);
}
texture_cache_.clear();
DestroyInternal();
}