Bugfix, studio report by Pablo Venomgfx
authorTon Roosendaal <ton@blender.org>
Sun, 12 Oct 2008 13:16:23 +0000 (13:16 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 12 Oct 2008 13:16:23 +0000 (13:16 +0000)
- insert key crashed when object ipo was in action, but action got unlinked
  from object

source/blender/src/keyframing.c

index c5777b9c2a66e2edcbec824527b2863af925f76e..e61d81401839e9a19f70b9fc193d1a989de03ee3 100644 (file)
@@ -1347,10 +1347,12 @@ static void commonkey_context_getv3d (ListBase *sources, bKeyingContext **ksc)
                                                if (achan && achan->ipo)
                                                        cks->ipo= achan->ipo;
                                        }
-                                       
-                                       /* deselect all ipo-curves */
-                                       for (icu= cks->ipo->curve.first; icu; icu= icu->next) {
-                                               icu->flag &= ~IPO_SELECT;
+                                       /* cks->ipo can be NULL while editing */
+                                       if(cks->ipo) {
+                                               /* deselect all ipo-curves */
+                                               for (icu= cks->ipo->curve.first; icu; icu= icu->next) {
+                                                       icu->flag &= ~IPO_SELECT;
+                                               }
                                        }
                                }
                        }