diff --git a/src/Project.cpp b/src/Project.cpp index c9b7c4be6..903274565 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -2029,7 +2029,8 @@ void AudacityProject::FixScrollbars() } CallAfter( - [this]{ GetTrackPanel()->HandleCursorForPresentMouseState(); } ); + [this]{ if (GetTrackPanel()) + GetTrackPanel()->HandleCursorForPresentMouseState(); } ); } std::shared_ptr AudacityProject::GetFirstVisible() @@ -2279,7 +2280,8 @@ void AudacityProject::DoScroll() } CallAfter( - [this]{ GetTrackPanel()->HandleCursorForPresentMouseState(); } ); + [this]{ if (GetTrackPanel()) + GetTrackPanel()->HandleCursorForPresentMouseState(); } ); } bool AudacityProject::ReportIfActionNotAllowed