@@ -900,8 +900,7 @@ void ProjectActionsController::uploadAudioToAudioCom(const AudioFile& audio, con
900900
901901 m_uploadingAudioProgress->finished ().onReceive (this , [this , audio, project, info](const ProgressResult& res) {
902902 LOGD () << " Uploading audio finished" ;
903-
904- audio.device ->deleteLater ();
903+ (void )audio; // make sure it lives long enough
905904
906905 if (!res.ret ) {
907906 LOGE () << res.ret .toString ();
@@ -915,6 +914,10 @@ void ProjectActionsController::uploadAudioToAudioCom(const AudioFile& audio, con
915914 project->setCloudAudioInfo (newInfo);
916915 }
917916 }
917+
918+ m_uploadingAudioProgress->started ().disconnect (this );
919+ m_uploadingAudioProgress->progressChanged ().disconnect (this );
920+ m_uploadingAudioProgress->finished ().disconnect (this );
918921 });
919922}
920923
@@ -1281,6 +1284,8 @@ Ret ProjectActionsController::uploadProject(const CloudProjectInfo& info, const
12811284 m_uploadingProjectProgress->finished ().onReceive (this , [this , project, info, audio, openEditUrl, publishMode,
12821285 isFirstSave, &ret, &eventLoop](const ProgressResult& res) {
12831286 DEFER {
1287+ m_uploadingProjectProgress->progressChanged ().disconnect (this );
1288+ m_uploadingProjectProgress->finished ().disconnect (this );
12841289 eventLoop.quit ();
12851290 };
12861291
@@ -1355,6 +1360,9 @@ void ProjectActionsController::uploadAudioToMuseScoreCom(const AudioFile& audio,
13551360 if (publishMode && (configuration ()->alsoShareAudioCom () || configuration ()->showAlsoShareAudioComDialog ())) {
13561361 alsoShareAudioCom (audio);
13571362 }
1363+
1364+ m_uploadingAudioProgress->progressChanged ().disconnect (this );
1365+ m_uploadingAudioProgress->finished ().disconnect (this );
13581366 });
13591367}
13601368
0 commit comments