mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Prevent dangling pointers to meters...
... This stops a crash that might occur when the checkpoint thread causes ProjectAudioManager::Stop() to execute but the project is in the process of closing.
This commit is contained in:
parent
7fcd90e351
commit
2d6db518fa
@ -12,6 +12,7 @@ Paul Licameli split from AudacityProject.cpp
|
|||||||
|
|
||||||
#include "AudioIOBase.h"
|
#include "AudioIOBase.h"
|
||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
|
#include "widgets/MeterPanelBase.h"
|
||||||
|
|
||||||
static const AudacityProject::AttachedObjects::RegisteredFactory sAudioIOKey{
|
static const AudacityProject::AttachedObjects::RegisteredFactory sAudioIOKey{
|
||||||
[]( AudacityProject &parent ){
|
[]( AudacityProject &parent ){
|
||||||
|
@ -12,6 +12,7 @@ Paul Licameli split from AudacityProject.h
|
|||||||
#define __PROJECT_AUDIO_IO__
|
#define __PROJECT_AUDIO_IO__
|
||||||
|
|
||||||
#include "ClientData.h" // to inherit
|
#include "ClientData.h" // to inherit
|
||||||
|
#include <wx/weakref.h>
|
||||||
|
|
||||||
class AudacityProject;
|
class AudacityProject;
|
||||||
class MeterPanelBase;
|
class MeterPanelBase;
|
||||||
@ -43,8 +44,8 @@ private:
|
|||||||
AudacityProject &mProject;
|
AudacityProject &mProject;
|
||||||
|
|
||||||
// Project owned meters
|
// Project owned meters
|
||||||
MeterPanelBase *mPlaybackMeter{};
|
wxWeakRef<MeterPanelBase> mPlaybackMeter{};
|
||||||
MeterPanelBase *mCaptureMeter{};
|
wxWeakRef<MeterPanelBase> mCaptureMeter{};
|
||||||
|
|
||||||
int mAudioIOToken{ -1 };
|
int mAudioIOToken{ -1 };
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user