mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-25 17:08:07 +02:00
Windows: don't crash if double-clicking on ruler during playback
This commit is contained in:
parent
04a69f0a4c
commit
932734c89a
@ -3087,6 +3087,12 @@ auto AdornedRulerPanel::QPHandle::Release
|
|||||||
(const TrackPanelMouseEvent &event, AudacityProject *pProject,
|
(const TrackPanelMouseEvent &event, AudacityProject *pProject,
|
||||||
wxWindow *pParent) -> Result
|
wxWindow *pParent) -> Result
|
||||||
{
|
{
|
||||||
|
// Keep a shared pointer to self. Otherwise *this might get deleted
|
||||||
|
// in HandleQPRelease on Windows! Because there is an event-loop yield
|
||||||
|
// stopping playback, which caused OnCaptureLost to be called, which caused
|
||||||
|
// clearing of CellularPanel targets!
|
||||||
|
auto saveMe = mParent->mQPCell->mHolder.lock();
|
||||||
|
|
||||||
auto result = CommonRulerHandle::Release(event, pProject, pParent);
|
auto result = CommonRulerHandle::Release(event, pProject, pParent);
|
||||||
if (!( result & RefreshCode::Cancelled )) {
|
if (!( result & RefreshCode::Cancelled )) {
|
||||||
if (mClicked == Button::Left) {
|
if (mClicked == Button::Left) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user