Fix ASSERT when SSC is accessed, but Serial Port 'None' is selected

This commit is contained in:
tomch 2009-12-12 12:50:53 +00:00
parent 2ec999056d
commit 563507f44b

View File

@ -270,9 +270,8 @@ BOOL CSuperSerialCard::CheckComm()
}
}
}
else
else if (m_dwSerialPortItem)
{
_ASSERT(m_dwSerialPortItem);
_ASSERT(m_dwSerialPortItem < m_vecSerialPortsItems.size()-1); // size()-1 is TCP item
TCHAR portname[SIZEOF_SERIALCHOICE_ITEM];
wsprintf(portname, TEXT("COM%u"), m_vecSerialPortsItems[m_dwSerialPortItem]);