mrdoob/three.js — pull request #2887 by Fox32 (2013-01-05 12:36:00+00:00)
Title: Fix bug in DirectionalLightHelper

If light.target.properties.targetInverse is false, no targetLine and
targetSphere is created, we can't update their values on update()!

---

I'm trying to use the DirectionalLightHelper to visualise my directional light.

But when I call update() on the helper, my program crashes.

DirectionalLightHelper:114
```
this.targetSphere.material.color.copy( this.color );
```
this.targetSphere is null/undefined!

It should be initialized at DirectionalLightHelper:67
```
this.targetSphere = new THREE.Mesh( targetGeo, targetMaterial );
```
but is not because of DirectionalLightHelper:62
```
if ( light.target.properties.targetInverse ) {
```

I'm using the default target (a Object3D at position [0,0,0]) for my directional light.

Am I missing something, or is update() missing a null/undefined check for this.targetSphere?