Merge pull request #14083 from sethalves/fix-recording-upload-crash

call saveRecordingToAsset callback on correct thread
This commit is contained in:
Brad Hefta-Gaub 2018-10-01 16:46:36 -07:00 committed by GitHub
commit e5d9c0d442
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,7 +243,8 @@ bool RecordingScriptingInterface::saveRecordingToAsset(QScriptValue getClipAtpUr
}
if (auto upload = DependencyManager::get<AssetClient>()->createUpload(recording::Clip::toBuffer(_lastClip))) {
QObject::connect(upload, &AssetUpload::finished, this, [=](AssetUpload* upload, const QString& hash) mutable {
QObject::connect(upload, &AssetUpload::finished,
getClipAtpUrl.engine(), [=](AssetUpload* upload, const QString& hash) mutable {
QString clip_atp_url = "";
if (upload->getError() == AssetUpload::NoError) {