Fix crash when dragging playhead or mouse in ruler area
authorTim Mayberry <mojofunk@gmail.com>
Tue, 21 Mar 2017 10:32:38 +0000 (20:32 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Sat, 1 Apr 2017 12:04:56 +0000 (22:04 +1000)
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

index ed8fe2f235c1620b0fe04539af1668308f8c25ae..458667ce645935cd4e367ed12d4cb41a5c21498e 100644 (file)
@@ -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();