Added check for null whitelist
This commit is contained in:
parent
139f62f57e
commit
89836def2f
1 changed files with 4 additions and 0 deletions
|
@ -1487,6 +1487,8 @@ bool CDMRSlot::DstIdBlacklist(unsigned int did, unsigned int slot)
|
||||||
bool CDMRSlot::DstIdWhitelist(unsigned int did, unsigned int slot, bool gt4k)
|
bool CDMRSlot::DstIdWhitelist(unsigned int did, unsigned int slot, bool gt4k)
|
||||||
{
|
{
|
||||||
if (slot == 1) {
|
if (slot == 1) {
|
||||||
|
if(m_dstWhiteListSlot1.size == 0)
|
||||||
|
return;
|
||||||
if(gt4k) {
|
if(gt4k) {
|
||||||
if (std::find(m_dstWhiteListSlot1.begin(), m_dstWhiteListSlot1.end(), did) != m_dstWhiteListSlot1.end() || did >= 4000)
|
if (std::find(m_dstWhiteListSlot1.begin(), m_dstWhiteListSlot1.end(), did) != m_dstWhiteListSlot1.end() || did >= 4000)
|
||||||
return true;
|
return true;
|
||||||
|
@ -1495,6 +1497,8 @@ bool CDMRSlot::DstIdWhitelist(unsigned int did, unsigned int slot, bool gt4k)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if(m_dstWhiteListSlot2.size == 0)
|
||||||
|
return;
|
||||||
if(gt4k) {
|
if(gt4k) {
|
||||||
if (std::find(m_dstWhiteListSlot2.begin(), m_dstWhiteListSlot2.end(), did) != m_dstWhiteListSlot2.end() || did >= 4000)
|
if (std::find(m_dstWhiteListSlot2.begin(), m_dstWhiteListSlot2.end(), did) != m_dstWhiteListSlot2.end() || did >= 4000)
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue