Commit 78b3107c authored by Don Gagne's avatar Don Gagne

Fixed bug found during testing

Delete of last link would cause crash. Need to check for -1 which
signals no selection in combo box.
parent f68be0ca
......@@ -228,12 +228,14 @@ void DebugConsole::linkSelected(int linkId)
m_ui->receiveText->clear();
// Connect new link
currLink = links[linkId];
connect(currLink, SIGNAL(bytesReceived(LinkInterface*,QByteArray)), this, SLOT(receiveBytes(LinkInterface*, QByteArray)));
connect(currLink, SIGNAL(connected(bool)), this, SLOT(setConnectionState(bool)));
connect(currLink,SIGNAL(communicationUpdate(QString,QString)),this,SLOT(linkStatusUpdate(QString,QString)));
setConnectionState(currLink->isConnected());
snapShotTimer.start();
if (linkId != -1) {
currLink = links[linkId];
connect(currLink, SIGNAL(bytesReceived(LinkInterface*,QByteArray)), this, SLOT(receiveBytes(LinkInterface*, QByteArray)));
connect(currLink, SIGNAL(connected(bool)), this, SLOT(setConnectionState(bool)));
connect(currLink,SIGNAL(communicationUpdate(QString,QString)),this,SLOT(linkStatusUpdate(QString,QString)));
setConnectionState(currLink->isConnected());
snapShotTimer.start();
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment