Added check for null whitelist

This commit is contained in:
Simon 2016-06-10 10:22:02 +01:00
parent 139f62f57e
commit 89836def2f

View file

@ -1487,6 +1487,8 @@ bool CDMRSlot::DstIdBlacklist(unsigned int did, unsigned int slot)
bool CDMRSlot::DstIdWhitelist(unsigned int did, unsigned int slot, bool gt4k)
{
if (slot == 1) {
if(m_dstWhiteListSlot1.size == 0)
return;
if(gt4k) {
if (std::find(m_dstWhiteListSlot1.begin(), m_dstWhiteListSlot1.end(), did) != m_dstWhiteListSlot1.end() || did >= 4000)
return true;
@ -1495,6 +1497,8 @@ bool CDMRSlot::DstIdWhitelist(unsigned int did, unsigned int slot, bool gt4k)
return true;
}
} else {
if(m_dstWhiteListSlot2.size == 0)
return;
if(gt4k) {
if (std::find(m_dstWhiteListSlot2.begin(), m_dstWhiteListSlot2.end(), did) != m_dstWhiteListSlot2.end() || did >= 4000)
return true;