diff --git a/leenkx/blender/lnx/write_data.py b/leenkx/blender/lnx/write_data.py index a613815..5a9a6a6 100644 --- a/leenkx/blender/lnx/write_data.py +++ b/leenkx/blender/lnx/write_data.py @@ -818,7 +818,7 @@ const int compoChromaticSamples = {rpdat.lnx_chromatic_aberration_samples}; focus_distance = 0.0 fstop = 0.0 - if len(bpy.data.cameras) > 0 and lnx.utils.get_active_scene().camera.data.dof.use_dof: + if lnx.utils.get_active_scene().camera and lnx.utils.get_active_scene().camera.data.dof.use_dof: focus_distance = lnx.utils.get_active_scene().camera.data.dof.focus_distance fstop = lnx.utils.get_active_scene().camera.data.dof.aperture_fstop lens = lnx.utils.get_active_scene().camera.data.lens