webgl: Restore active texture if it's changed while deleting a texture.

This commit is contained in:
Josh Matthews 2018-09-21 15:22:12 -04:00 committed by GitHub
parent 34385d90aa
commit 46f4b18722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2221,7 +2221,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
}
// Restore bound texture unit if it has been changed.
if active_unit_enum == self.textures.active_unit_enum() {
if active_unit_enum != self.textures.active_unit_enum() {
self.send_command(WebGLCommand::ActiveTexture(
self.textures.active_unit_enum(),
));