mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
Fix crash if no devices.
This commit is contained in:
parent
035e6f59be
commit
44385832c3
@ -82,6 +82,8 @@ SIDAddChannelsDialog::~SIDAddChannelsDialog()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SIDAddChannelsDialog::accept()
|
void SIDAddChannelsDialog::accept()
|
||||||
|
{
|
||||||
|
if (ui->channels->columnCount() > 2)
|
||||||
{
|
{
|
||||||
MainCore *mainCore = MainCore::instance();
|
MainCore *mainCore = MainCore::instance();
|
||||||
connect(mainCore, &MainCore::channelAdded, this, &SIDAddChannelsDialog::channelAdded);
|
connect(mainCore, &MainCore::channelAdded, this, &SIDAddChannelsDialog::channelAdded);
|
||||||
@ -91,6 +93,11 @@ void SIDAddChannelsDialog::accept()
|
|||||||
m_col = COL_DEVICE;
|
m_col = COL_DEVICE;
|
||||||
addNextChannel();
|
addNextChannel();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QDialog::accept();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SIDAddChannelsDialog::addNextChannel()
|
void SIDAddChannelsDialog::addNextChannel()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user