mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-21 13:05:43 -05:00
Move BinaryMessage isFull() check into try block to prevent NPE. (#881)
From issue 879: When a BitSetFullException is caught and reset(0) is called, the BinaryMessage is set to null. This should resolve issue 879.
This commit is contained in:
@@ -201,14 +201,6 @@ public class P25P1MessageFramer implements Listener<Dibit>, IP25P1DataUnitDetect
|
||||
{
|
||||
mBinaryMessage.add(dibit.getBit1());
|
||||
mBinaryMessage.add(dibit.getBit2());
|
||||
}
|
||||
catch(BitSetFullException bsfe)
|
||||
{
|
||||
// mLog.debug("Message full exception - unexpected");
|
||||
|
||||
//Reset so that we can start over again
|
||||
reset(0);
|
||||
}
|
||||
|
||||
if(mBinaryMessage.isFull())
|
||||
{
|
||||
@@ -221,6 +213,14 @@ public class P25P1MessageFramer implements Listener<Dibit>, IP25P1DataUnitDetect
|
||||
dispatchMessage();
|
||||
}
|
||||
}
|
||||
catch(BitSetFullException bsfe)
|
||||
{
|
||||
// mLog.debug("Message full exception - unexpected");
|
||||
|
||||
//Reset so that we can start over again
|
||||
reset(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Suppress any trailing nulls or status dibits that follow certain DUID sequences
|
||||
|
||||
Reference in New Issue
Block a user