Skip to content

Commit

Permalink
Fix other crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
juribeparada committed Aug 20, 2018
1 parent 713d12e commit b66a92b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions P25Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ unsigned int CP25Control::readModem(unsigned char* data)
void CP25Control::writeNetwork()
{
unsigned char data[100U];

if (m_network == NULL)
return;

unsigned int length = m_network->read(data, 100U);
if (length == 0U)
return;
Expand Down
1 change: 0 additions & 1 deletion P25NID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ CP25NID::~CP25NID()
delete[] m_term;
delete[] m_tsdu;
delete[] m_pdu;
delete[] m_tsdu;
}

bool CP25NID::decode(const unsigned char* data)
Expand Down
3 changes: 2 additions & 1 deletion POCSAGControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ unsigned int CPOCSAGControl::readModem(unsigned char* data)

bool CPOCSAGControl::processData()
{
assert(m_network != NULL);
if (m_network == NULL)
return false;

unsigned char data[300U];
unsigned int length = m_network->read(data);
Expand Down

0 comments on commit b66a92b

Please sign in to comment.