mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-29 16:08:46 +01:00
Bug 2060: Windows: no access to microphone causes crash
Problem: 1. Set no access to microphone in Privacy category of Settings app. 2. Try to record in a new track. (not append to an existing track.) 3. Audacity crashes. Cause of crash: TrackPanel::OnTrackListResizing is called with a track after a call to TrackList::ClearPendingTracks, which has removed its owner. TrackPanel::OnTrackListResizing ends up calling TrackPanel::UpdateTrackVRuler, and this function calls TrackList::Channels(t)), which assumes the track has an owner. Crash. Fix: in TrackPanel::OnTrackListResizing, check that the track has an owner.
This commit is contained in:
@@ -329,6 +329,8 @@ public:
|
||||
// For use when loading a file. Return true if ok, else make repair
|
||||
bool LinkConsistencyCheck();
|
||||
|
||||
bool HasOwner() const { return static_cast<bool>(GetOwner());}
|
||||
|
||||
private:
|
||||
std::shared_ptr<TrackList> GetOwner() const { return mList.lock(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user