slider emu: check serial state pointer isn't null

This commit is contained in:
somewhatlurker
2020-08-11 03:20:59 +10:00
parent 22047cec12
commit d3d086635d
@@ -6,7 +6,10 @@ namespace TLAC::Components
{
if (index < 0 || index >= SLIDER_SENSORS)
return;
if (SerialState == nullptr)
return;
uint32_t* ph = SerialState->sliderSerialResponse.sensors[index].pressureHistory;
ph[3] = ph[2];
ph[2] = ph[1];