fix [#36270] Crash with pinning
authorCampbell Barton <ideasman42@gmail.com>
Fri, 26 Jul 2013 16:19:26 +0000 (16:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 26 Jul 2013 16:19:26 +0000 (16:19 +0000)
source/blender/blenkernel/intern/object.c

index daa57afe14e4e44260f92a5d69abaaceb2fe961d..8ac067c03160e6861eb5f889edc75cb9f2e82308 100644 (file)
@@ -693,6 +693,14 @@ void BKE_object_unlink(Object *ob)
                                                sbuts->pinid = NULL;
                                        }
                                }
+                               else if (sl->spacetype == SPACE_NODE) {
+                                       SpaceNode *snode = (SpaceNode *)sl;
+
+                                       if (snode->from == (ID *)ob) {
+                                               snode->flag &= ~SNODE_PIN;
+                                               snode->from = NULL;
+                                       }
+                               }
                        }
 
                        sa = sa->next;