From ee916d5c637da0815c402c39496899e671ea2c9e Mon Sep 17 00:00:00 2001 From: danxionglei Date: Tue, 7 Aug 2018 22:21:07 +0800 Subject: [PATCH] fix(webgl): fix issue https://github.com/servo/servo/issues/21352 If we have a bounded framebuffer previously, which is not the one to delete. we would not change the !binding, but we would change the GLSide with Command::BindFramebuffer(Default). --- components/script/dom/webglrenderingcontext.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index e265c83aa90..204cf934dd3 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -93,10 +93,9 @@ macro_rules! handle_object_deletion { if let Some(bound_object) = $binding.get() { if bound_object.id() == $object.id() { $binding.set(None); - } - - if let Some(command) = $unbind_command { - $self_.send_command(command); + if let Some(command) = $unbind_command { + $self_.send_command(command); + } } } };