Freestyle: fix crash unlinking object
[blender.git] / source / blender / blenkernel / intern / object.c
index f3655e94eb0aa52ac43734fb5c07a2d1b522fe73..6f0f6a357bbb71a374d7365449283e8796f26029 100644 (file)
@@ -682,8 +682,9 @@ void BKE_object_unlink(Object *ob)
                        }
 
                        for (srl= sce->r.layers.first; srl; srl= srl->next) {
-                               for (lineset = (FreestyleLineSet *)&srl->freestyleConfig.linesets.first;
-                                    lineset; lineset = lineset->next) {
+                               for (lineset = (FreestyleLineSet *)srl->freestyleConfig.linesets.first;
+                                    lineset; lineset = lineset->next)
+                               {
                                        BKE_unlink_linestyle_target_object(lineset->linestyle, ob);
                                }
                        }