Bugfix: Remove drivers button was broken
authorJoshua Leung <aligorith@gmail.com>
Mon, 16 Nov 2009 12:44:33 +0000 (12:44 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 16 Nov 2009 12:44:33 +0000 (12:44 +0000)
Somehow this worked here, even though the pointer being referenced was supposed to have been freed already...

source/blender/editors/space_graph/graph_buttons.c

index f686d8f24b9a5b75cbf8bbf907f9aa996c56d7f1..8aa236544d6bafb2d33d654cc4c62129967d377b 100644 (file)
@@ -324,7 +324,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
                uiButSetFunc(but, driver_update_flags_cb, fcu, NULL);
                
                but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, "Remove Driver", 0, 0, 10*UI_UNIT_X, 18, NULL, 0.0, 0.0, 0, 0, "Remove this driver");
-               uiButSetFunc(but, driver_remove_cb, ale, NULL);
+               uiButSetNFunc(but, driver_remove_cb, MEM_dupallocN(ale), NULL);
                
        /* driver-level settings - type, expressions, and errors */
        RNA_pointer_create(ale->id, &RNA_Driver, driver, &driver_ptr);