From 3939a9e5600a8ee1dc97e85744ffb71664f6f411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Thu, 30 Nov 2017 13:52:50 +0100 Subject: [PATCH] Sequencer - Fixed a crash on override track clearing --- ui-sequencer.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui-sequencer.cc b/ui-sequencer.cc index d2e4bea..94f8321 100644 --- a/ui-sequencer.cc +++ b/ui-sequencer.cc @@ -603,20 +603,18 @@ void T_SyncViewImpl_::checkSelection( ) noexcept return; } auto& sync{ Common::Sync( ) }; - auto const* const curve{ sync.getCurve( - selId->isOverride - ? sync.getOverride( selId->id )->inputNames( )[ 0 ] - : selId->id ) }; + auto const* const ovr{ selId->isOverride ? sync.getOverride( selId->id ) : nullptr }; + auto const* const curve{ sync.getCurve( ovr ? ovr->inputNames( )[ 0 ] : selId->id ) }; // Missing curve - if ( !( curve || selId->isOverride ) ) { + if ( !curve ) { // Remove segment/point selection if ( selSegment ) { selSegment.clear( ); selPoint.clear( ); } // If there's no matching input, unselect the track - if ( !sync.hasInput( selId->id ) ) { + if ( !( ovr || sync.hasInput( selId->id ) ) ) { selId.clear( ); } } else {