mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +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)
|
||||
{
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user