From 31f0437353f1907e15be644dd2b66c0c6fbe44c1 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:58:28 +0100 Subject: [PATCH] BLE Spam fix null pointer on credits / help pages --- applications/external/ble_spam/ble_spam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/external/ble_spam/ble_spam.c b/applications/external/ble_spam/ble_spam.c index ce6aabe28..931bd9505 100644 --- a/applications/external/ble_spam/ble_spam.c +++ b/applications/external/ble_spam/ble_spam.c @@ -196,8 +196,8 @@ static void draw_callback(Canvas* canvas, void* ctx) { const Attack* attack = (state->index >= 0 && state->index <= ATTACK_COUNT - 1) ? &attacks[state->index] : NULL; - const BleSpamPayload* payload = &attack->payload; - const BleSpamProtocol* protocol = attack->protocol; + const BleSpamPayload* payload = attack ? &attack->payload : NULL; + const BleSpamProtocol* protocol = attack ? attack->protocol : NULL; canvas_set_font(canvas, FontSecondary); canvas_draw_icon(canvas, 4, 3, protocol ? protocol->icon : &I_ble);