Workaround for Secondary camera crash

This commit is contained in:
Fluffy Jenkins 2019-12-19 23:31:10 +00:00
parent 6b5d1c6191
commit 83e9b891d8

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) {