From d91ce4febfa07056fa96b34fbe2c8ee72e3f4945 Mon Sep 17 00:00:00 2001 From: rob-bateman Date: Thu, 11 Jul 2013 04:10:20 +0100 Subject: [PATCH] fix for runtime error when using getSceneCollision on view --- src/away3d/core/traverse/EntityCollector.as | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/away3d/core/traverse/EntityCollector.as b/src/away3d/core/traverse/EntityCollector.as index 745e1a611..99123589e 100644 --- a/src/away3d/core/traverse/EntityCollector.as +++ b/src/away3d/core/traverse/EntityCollector.as @@ -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;