Freestyle: fix crash unlinking object
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 26 Mar 2013 08:32:53 +0000 (08:32 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 26 Mar 2013 08:32:53 +0000 (08:32 +0000)
Was getting an address of pointer variable.

1  2 
source/blender/blenkernel/intern/object.c

@@@ -680,13 -677,6 +680,14 @@@ void BKE_object_unlink(Object *ob
                                }
                                SEQ_END
                        }
-                               for (lineset = (FreestyleLineSet *)&srl->freestyleConfig.linesets.first;
-                                    lineset; lineset = lineset->next) {
 +
 +                      for (srl= sce->r.layers.first; srl; srl= srl->next) {
++                              for (lineset = (FreestyleLineSet *)srl->freestyleConfig.linesets.first;
++                                   lineset; lineset = lineset->next)
++                              {
 +                                      BKE_unlink_linestyle_target_object(lineset->linestyle, ob);
 +                              }
 +                      }
                }
  
                sce = sce->id.next;