From 8752f55a5fa485b2ce0d827912e8ad44be631a5b Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 13 Apr 2022 21:52:05 -0400 Subject: [PATCH] logging of live data structs was: data points #3614 progress --- firmware/console/binary/tunerstudio.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index b52e710d78..615b0f7fad 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -171,6 +171,12 @@ static void handlePageSelectCommand(TsChannelBase *tsChannel, ts_response_format #if EFI_TUNER_STUDIO const void * getStructAddr(live_data_e structId) { + if (engine == nullptr) { +#if ! EFI_UNIT_TEST + firmwareError(OBD_PCM_Processor_Fault, "getStructAddr: No engine reference"); +#endif + return nullptr; + } switch (structId) { case LDS_high_pressure_fuel_pump: #if EFI_HPFP