2020-06-09 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdlibrary(1) that would throw a segfault when
	attempting to delete a range of cuts, one of which was in the
	clipboard.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2020-06-09 09:55:40 -04:00
parent bfab34e478
commit f2ed0c1601
2 changed files with 15 additions and 8 deletions

View File

@@ -19868,3 +19868,7 @@
* Fixed a cast overflow bug in rdairplay(1) that cause incorrect
pie timer indications after adding or deleting events to a running
log.
2020-06-09 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdlibrary(1) that would throw a segfault when
attempting to delete a range of cuts, one of which was in the
clipboard.

View File

@@ -360,15 +360,18 @@ void AudioCart::deleteCutData()
// Check Clipboard
//
if(cut_clipboard!=NULL) {
if(item->text(12)==cut_clipboard->cutName()) {
if(QMessageBox::question(this,tr("Empty Clipboard"),
tr("Deleting this cut will also empty the clipboard.\nDo you still want to proceed?"),QMessageBox::Yes,QMessageBox::No)==
QMessageBox::No) {
return;
for(unsigned i=0;i<cutnames.size();i++) {
if(cutnames.at(i)==cut_clipboard->cutName()) {
if(QMessageBox::question(this,tr("Empty Clipboard"),
tr("Deleting this cut will also empty the clipboard.\nDo you still want to proceed?"),QMessageBox::Yes,QMessageBox::No)==
QMessageBox::No) {
return;
}
delete cut_clipboard;
cut_clipboard=NULL;
paste_cut_button->setDisabled(true);
break;
}
delete cut_clipboard;
cut_clipboard=NULL;
paste_cut_button->setDisabled(true);
}
}