- int track_w = track->track_w, track_h = track->track_h;
- track->automation->get_projector(
- &projector_x, &projector_y, &projector_z,
- position, PLAY_FORWARD);
- projector_x += mwindow->edl->session->output_w / 2;
- projector_y += mwindow->edl->session->output_h / 2;
- cursor_x = (cursor_x - projector_x) / projector_z + track_w / 2;
- cursor_y = (cursor_y - projector_y) / projector_z + track_h / 2;
+ Track *track = get_drag_track();
+ if( track ) {
+ track->automation->get_projector(
+ &projector_x, &projector_y, &projector_z,
+ position, PLAY_FORWARD);
+ projector_x += mwindow->edl->session->output_w / 2;
+ projector_y += mwindow->edl->session->output_h / 2;
+ cursor_x = (cursor_x - projector_x) / projector_z + track_w / 2;
+ cursor_y = (cursor_y - projector_y) / projector_z + track_h / 2;
+ }