Fix #34121: OSL + persistent images option was not freeing shader memory properly,
[blender.git] / source / blender / editors / render / render_preview.c
index 33b00cbf2ea21dea430ed76bd8556d675ac384de..dfc80e4cf515f82b490024d1dab13603925430bd 100644 (file)
@@ -362,7 +362,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
                                }
                                else {
                                        /* use current scene world to light sphere */
-                                       if (ma->pr_type == MA_SPHERE_A)
+                                       if (mat->pr_type == MA_SPHERE_A)
                                                sce->world = scene->world;
                                }