summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2017-03-21 20:32:38 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-04-01 22:04:56 +1000
commit752706911ed9a14d570d27263ca42a9b0bc0cef3 (patch)
tree73f272a3ffc125047569aa062ca1d6eff00820b4
parent727ac30dd2218f73f4d1b097820ec67f716cf40a (diff)
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
-rw-r--r--gtk2_ardour/editor.cc2
1 files changed, 1 insertions, 1 deletions
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();