mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 13:18:35 -07:00
BLE Spam fix null pointer on credits / help pages
This commit is contained in:
4
applications/external/ble_spam/ble_spam.c
vendored
4
applications/external/ble_spam/ble_spam.c
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user