Merging r46062 through r46073 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / space_clip / clip_graph_ops.c
index 113c11995d1444a451f55addb2d3136cee0dcede..7ab41078e16d42500bf0d7ea9d41a5e2ab05830f 100644 (file)
@@ -63,9 +63,9 @@
 
 static int ED_space_clip_graph_poll(bContext *C)
 {
-       SpaceClip *sc = CTX_wm_space_clip(C);
+       if (ED_space_clip_tracking_poll(C)) {
+               SpaceClip *sc = CTX_wm_space_clip(C);
 
-       if (sc && sc->clip) {
                if (sc->view == SC_VIEW_GRAPH) {
                        ARegion *ar = CTX_wm_region(C);
 
@@ -488,7 +488,7 @@ void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
        /* api callbacks */
        ot->invoke = WM_operator_confirm;
        ot->exec = delete_curve_exec;
-       ot->poll = ED_space_clip_poll;
+       ot->poll = ED_space_clip_tracking_poll;
 
        /* flags */
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;