Check if packet is decrypted before searching node in DB (#2320)

* Check whether TraceRouteModule exists
In case in the future we don't enable it

* Check whether packet is decrypted before searching node in DB
This commit is contained in:
GUVWAF
2023-03-02 20:22:14 +01:00
committed by GitHub
parent 8c059a8a9e
commit eb4ab26e1f
2 changed files with 3 additions and 2 deletions

View File

@@ -44,7 +44,8 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
tosend->hop_limit--; // bump down the hop count
// If it is a traceRoute request, update the route that it went via me
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag && traceRouteModule->wantPacket(p)) {
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag && traceRouteModule &&
traceRouteModule->wantPacket(p)) {
traceRouteModule->updateRoute(tosend);
}