mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 16:25:45 +08:00
Added check for null whitelist
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user