From 0219a5a9bc9f83ba861a5a4331e73e821349127c Mon Sep 17 00:00:00 2001 From: Good Guy Date: Sun, 20 Mar 2016 18:26:58 -0600 Subject: [PATCH] fix bad uuid.h ref, fix segv in is_over_patchbay for only one pane --- cinelerra-5.1/cinelerra/brender.C | 2 +- cinelerra-5.1/cinelerra/timelinepane.C | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cinelerra-5.1/cinelerra/brender.C b/cinelerra-5.1/cinelerra/brender.C index 94a569a7..35144b26 100644 --- a/cinelerra-5.1/cinelerra/brender.C +++ b/cinelerra-5.1/cinelerra/brender.C @@ -49,7 +49,7 @@ extern "C" { -#include +#include } diff --git a/cinelerra-5.1/cinelerra/timelinepane.C b/cinelerra-5.1/cinelerra/timelinepane.C index 7aae8ebd..e3d3bb4f 100644 --- a/cinelerra-5.1/cinelerra/timelinepane.C +++ b/cinelerra-5.1/cinelerra/timelinepane.C @@ -319,8 +319,12 @@ Track *TimelinePane::is_over_patchbay() if( cursor_x < 0 || cursor_x >= w ) return 0; int cursor_y = gui->get_relative_cursor_y() - y; if( cursor_y < 0 || cursor_y >= h ) return 0; + int no = number; + TrackScroll *trackscroll = gui->pane[no]->trackscroll; + if( !trackscroll ) + trackscroll = gui->pane[++no]->trackscroll; // left panes have patchbays, right panes have trackscroll - int pane_y = cursor_y + gui->pane[number+1]->trackscroll->get_position(); + int pane_y = cursor_y + trackscroll->get_position(); for( Track *track=mwindow->edl->tracks->first; track; track=track->next ) { int track_y = track->y_pixel; if( pane_y < track_y ) continue; -- 2.26.2