diff options
author | Robin Gareus <robin@gareus.org> | 2016-02-09 21:36:49 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-02-09 21:36:49 +0100 |
commit | 1ec78d26ee7cd5a612a7f98f9977dbb8ef46a593 (patch) | |
tree | 4a9ffbb83e2ddb927ba0b21b42c8c8b516ea29a9 /libs/ardour/export_handler.cc | |
parent | d56a44bf362ec338b97808390fdf6190d0920fad (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_handler.cc')
-rw-r--r-- | libs/ardour/export_handler.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index 71f79b793c..70c807b7de 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -150,6 +150,7 @@ ExportHandler::do_export () /* Start export */ + Glib::Threads::Mutex::Lock l (export_status->lock()); start_timespan (); } @@ -160,7 +161,7 @@ ExportHandler::start_timespan () if (config_map.empty()) { // freewheeling has to be stopped from outside the process cycle - export_status->running = false; + export_status->set_running (false); return; } @@ -219,11 +220,13 @@ ExportHandler::handle_duplicate_format_extensions() int ExportHandler::process (framecnt_t frames) { - if (!export_status->running) { + if (!export_status->running ()) { return 0; } else if (normalizing) { + Glib::Threads::Mutex::Lock l (export_status->lock()); return process_normalize (); } else { + Glib::Threads::Mutex::Lock l (export_status->lock()); return process_timespan (frames); } } |