gltf_viewer should not crash when there is no IBL.
This commit is contained in:
@@ -207,7 +207,10 @@ int main(int argc, char** argv) {
|
||||
// Add the renderables to the scene.
|
||||
app.viewer->setAsset(app.asset, app.names, !app.actualSize);
|
||||
|
||||
app.viewer->setIndirectLight(FilamentApp::get().getIBL()->getIndirectLight());
|
||||
auto ibl = FilamentApp::get().getIBL();
|
||||
if (ibl) {
|
||||
app.viewer->setIndirectLight(ibl->getIndirectLight());
|
||||
}
|
||||
};
|
||||
|
||||
auto setup = [&](Engine* engine, View* view, Scene* scene) {
|
||||
|
||||
Reference in New Issue
Block a user