Browse Source

BufferGeometry: Prevented duplicate index buffers.

tschw 10 years ago
parent
commit
97c70d207f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/core/BufferGeometry.js

+ 2 - 0
src/core/BufferGeometry.js

@@ -66,6 +66,8 @@ THREE.BufferGeometry.prototype = {
 			console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );
 			console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );
 			this.setIndex( attribute );
 			this.setIndex( attribute );
 
 
+			return;
+
 		}
 		}
 
 
 		this.attributes[ name ] = attribute;
 		this.attributes[ name ] = attribute;