Skip to content

Commit

Permalink
fix for runtime error when using getSceneCollision on view
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-bateman committed Jul 11, 2013
1 parent e30c034 commit d91ce4f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/away3d/core/traverse/EntityCollector.as
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ package away3d.core.traverse
*/
public function clear():void
{
_entryPoint = _camera.scenePosition;
_cameraForward = _camera.forwardVector;
if (_camera) {
_entryPoint = _camera.scenePosition;
_cameraForward = _camera.forwardVector;
}
_cullPlanes = _customCullPlanes? _customCullPlanes : (_camera? _camera.frustumPlanes : null);
_numCullPlanes = _cullPlanes? _cullPlanes.length : 0;
_numTriangles = _numMouseEnableds = 0;
Expand Down

0 comments on commit d91ce4f

Please sign in to comment.