diff --git a/src/spfx.c b/src/spfx.c index d1006bb..5616ed8 100644 --- a/src/spfx.c +++ b/src/spfx.c @@ -442,6 +442,10 @@ static int spfx_hapticInit(void) { #if SDL_VERSION_ATLEAST(1,3,0) SDL_HapticEffect* efx; + /* Haptic must be enabled. */ + if(haptic == NULL) + return 0; + efx = &haptic_rumbleEffect; memset(efx, 0, sizeof(SDL_HapticEffect)); efx->type = SDL_HAPTIC_SINE;