mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 12:36:07 -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.getBit1());
|
||||||
mBinaryMessage.add(dibit.getBit2());
|
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())
|
if(mBinaryMessage.isFull())
|
||||||
{
|
{
|
||||||
@@ -221,6 +213,14 @@ public class P25P1MessageFramer implements Listener<Dibit>, IP25P1DataUnitDetect
|
|||||||
dispatchMessage();
|
dispatchMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(BitSetFullException bsfe)
|
||||||
|
{
|
||||||
|
// mLog.debug("Message full exception - unexpected");
|
||||||
|
|
||||||
|
//Reset so that we can start over again
|
||||||
|
reset(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Suppress any trailing nulls or status dibits that follow certain DUID sequences
|
//Suppress any trailing nulls or status dibits that follow certain DUID sequences
|
||||||
|
|||||||
Reference in New Issue
Block a user