From 95141de657e02577f1d3fab0ca12122bfb68bc56 Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Wed, 14 Feb 2024 01:08:37 +0100 Subject: [PATCH] reset_fps_metrics: check that metrics is inited first --- src/keybinds.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/keybinds.cpp b/src/keybinds.cpp index f328e052..395eb559 100644 --- a/src/keybinds.cpp +++ b/src/keybinds.cpp @@ -99,6 +99,7 @@ void check_keybinds(struct overlay_params& params, uint32_t vendorID){ if (elapsedF12 >= keyPressDelay && keys_are_pressed(params.reset_fps_metrics)) { last_f12_press = now; - fpsmetrics->reset_metrics(); + if (fpsmetrics) + fpsmetrics->reset_metrics(); } }