@@ -638,7 +638,7 @@
const texture = textureMap.get( id );
- if ( texture.image !== undefined ) {
+ if ( texture !== undefined && texture.image !== undefined ) {
return texture;