[TLAC] Fix crash when an Xinput is connected, the slider emulator is disabled, and rumble is enabled

This commit is contained in:
nastys
2020-12-26 22:48:59 +01:00
parent 62b693943d
commit 66e439cce0
3 changed files with 5 additions and 1 deletions
@@ -252,7 +252,7 @@ namespace TLAC::Input
SetTapStates(i, elapsed);
}
if (rumble && TLAC::Components::TouchSliderEmulator::LatestInstance->isSliderTouched() && TLAC::Components::TargetInspector::ShouldVibrate)
if (rumble && TLAC::Components::touchSliderEmulatorIsEnabled && TLAC::Components::TouchSliderEmulator::LatestInstance->isSliderTouched() && TLAC::Components::TargetInspector::ShouldVibrate)
{
XINPUT_VIBRATION vibration;
ZeroMemory(&vibration, sizeof(XINPUT_VIBRATION));