mrdoob/three.js — pull request #5434 by mdufresne (2014-10-11 00:08:33+00:00)
Title: Bug fix mark dufresne

Simple check for undefined/null to address an error that occurs when materials are removed from THREE.MeshFaceMaterial's array but buffer.materialIndex hasn't been updated.