mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-07 22:58:10 -07:00
BLE Spam fix null pointer on credits / help pages
This commit is contained in:
+2
-2
@@ -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