summaryrefslogtreecommitdiff
path: root/libs/ardour/export_status.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-09 21:36:49 +0100
committerRobin Gareus <robin@gareus.org>2016-02-09 21:36:49 +0100
commit1ec78d26ee7cd5a612a7f98f9977dbb8ef46a593 (patch)
tree4a9ffbb83e2ddb927ba0b21b42c8c8b516ea29a9 /libs/ardour/export_status.cc
parentd56a44bf362ec338b97808390fdf6190d0920fad (diff)
Fix crash when aborting export.
The "Stop" button results in ExportHandlerPtr being destroyed. This must not happen while it's in use -- in particular during ExportHandler::start_timespan() and ExportHandler::finish_timespan()
Diffstat (limited to 'libs/ardour/export_status.cc')
-rw-r--r--libs/ardour/export_status.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/export_status.cc b/libs/ardour/export_status.cc
index 66f02c59c3..4b48a8edd7 100644
--- a/libs/ardour/export_status.cc
+++ b/libs/ardour/export_status.cc
@@ -33,10 +33,10 @@ ExportStatus::ExportStatus ()
void
ExportStatus::init ()
{
+ Glib::Threads::Mutex::Lock l (_run_lock);
stop = false;
- running = false;
+ _running = false;
_aborted = false;
- _finished = false;
_errors = false;
active_job = Exporting;
@@ -57,17 +57,17 @@ ExportStatus::init ()
void
ExportStatus::abort (bool error_occurred)
{
+ Glib::Threads::Mutex::Lock l (_run_lock);
_aborted = true;
- _finished = true;
_errors = _errors || error_occurred;
- running = false;
+ _running = false;
}
void
ExportStatus::finish ()
{
- _finished = true;
- running = false;
+ Glib::Threads::Mutex::Lock l (_run_lock);
+ set_running (false);
Finished(); /* EMIT SIGNAL */
}