1
0
Эх сурвалжийг харах

Bindings: Fix `_destroyBindings()`. (#34014)

Michael Herzog 1 долоо хоног өмнө
parent
commit
e00df5bf6b

+ 7 - 3
src/renderers/common/Bindings.js

@@ -271,10 +271,14 @@ class Bindings extends DataMap {
 
 
 							this.backend.destroySampler( binding );
 							this.backend.destroySampler( binding );
 
 
-						}
+						} else if ( binding.texture !== null ) {
+
+							// untrack destroyed bind group from its texture
 
 
-						const textureData = this.textures.get( binding.texture );
-						if ( textureData.bindGroups !== undefined ) textureData.bindGroups.delete( bindGroup );
+							const textureData = this.textures.get( binding.texture );
+							if ( textureData.bindGroups !== undefined ) textureData.bindGroups.delete( bindGroup );
+
+						}
 
 
 						binding.release();
 						binding.release();
 
 

粤ICP备19079148号