bssgp: Only call bssgp_tx_llc_discarded if the bctx exists

While this does not happen in real use, and unset btcx can lead to
segfaults in test cases. The other code outside of gprs_bssgp_pcu.cpp
does not depend on bctx being non-NULL:

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2015-08-21 15:10:23 +02:00
parent af387e2199
commit 6e013a136a
1 changed files with 2 additions and 1 deletions

View File

@ -318,7 +318,8 @@ drop_frame:
frames = 0xff;
if (octets > 0xffffff)
octets = 0xffffff;
bssgp_tx_llc_discarded(bctx, tlli(), frames, octets);
if (bctx)
bssgp_tx_llc_discarded(bctx, tlli(), frames, octets);
}
return msg;