Merge pull request #32 from FluffyJenkins/bug/SecondaryCamCrash

Workaround for Secondary camera crash
This commit is contained in:
kasenvr 2019-12-27 14:18:52 -05:00 committed by GitHub
commit 8771f619ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,6 +130,10 @@ void FetchSpatialTree::configure(const Config& config) {
}
void FetchSpatialTree::run(const RenderContextPointer& renderContext, const Inputs& inputs, ItemSpatialTree::ItemSelection& outSelection) {
if (!renderContext){
return;
}
// start fresh
outSelection.clear();
@ -142,6 +146,10 @@ void FetchSpatialTree::run(const RenderContextPointer& renderContext, const Inpu
RenderArgs* args = renderContext->args;
auto& scene = renderContext->_scene;
if (!args) {
return;
}
auto queryFrustum = args->getViewFrustum();
// Eventually use a frozen frustum
if (_freezeFrustum) {