diff options
Diffstat (limited to 'intern/cycles/blender/addon/ui.py')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 6c7c66d14fb..6ef8aa7611e 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -885,9 +885,10 @@ class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel): @classmethod def poll(cls, context): if CyclesButtonsPanel.poll(context): - for rl in context.scene.render.layers: - if rl.use_pass_mist: - return True + if context.world: + for rl in context.scene.render.layers: + if rl.use_pass_mist: + return True return False |