From af4fec015f583d762b70eabeca159a9dc379e0d8 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 29 Sep 2022 14:06:19 -0400 Subject: [PATCH] 2022-09-29 Fred Gleason * Fixed a regression in rdairplay(1) that caused a segfault when selecting a cart in the 'Select Cart' dialog if the Cue output assignment was disabled. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ lib/rdcart_dialog.cpp | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d583716..988258b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23415,3 +23415,7 @@ 2022-09-29 Fred Gleason * Modified rddbmgr(8) to include the Realm name in its default output. +2022-09-29 Fred Gleason + * Fixed a regression in rdairplay(1) that caused a segfault when + selecting a cart in the 'Select Cart' dialog if the Cue output + assignment was disabled. diff --git a/lib/rdcart_dialog.cpp b/lib/rdcart_dialog.cpp index 321c6e13..e65974f8 100644 --- a/lib/rdcart_dialog.cpp +++ b/lib/rdcart_dialog.cpp @@ -112,8 +112,6 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode, cart_player= new RDSimplePlayer(rda->cae(),rda->ripc(),rda->station()->cueCard(),rda->station()->cuePort(), rda->station()->cueStartCart(),rda->station()->cueStopCart(),this); - // cart_player->playButton()->setDisabled(true); - // cart_player->stopButton()->setDisabled(true); cart_player->stopButton()->setOnColor(Qt::red); } @@ -241,7 +239,7 @@ void RDCartDialog::selectionChangedData(const QItemSelection &before, { QModelIndexList rows=cart_cart_view->selectionModel()->selectedRows(); - if(rows.size()==1) { + if((cart_player!=NULL)&&(rows.size()==1)) { cart_player->setCart(cart_cart_model->cartNumber(rows.at(0))); cart_player->playButton()-> setEnabled(cart_cart_model->cartType(rows.at(0))==RDCart::Audio);