From 752706911ed9a14d570d27263ca42a9b0bc0cef3 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 21 Mar 2017 20:32:38 +1000 Subject: Fix crash when dragging playhead or mouse in ruler area This can be hard to reproduce and I have not been able to work out the steps to reproduce reliably, but as it is still occuring work around the issue by just checking the variable is valid before dereferencing it. Resolves: #7304 --- gtk2_ardour/editor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk2_ardour/editor.cc') diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ed8fe2f235..458667ce64 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4748,7 +4748,7 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_ switch (ep) { case EditAtPlayhead: - if (_dragging_playhead) { + if (_dragging_playhead && _control_scroll_target) { where = *_control_scroll_target; } else { where = _session->audible_frame(); -- cgit v1.2.3