From c4a0542ad366b18b831810b4cc3a6d20bf5196da Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Sun, 18 Jan 2009 08:07:53 +0000 Subject: [PATCH] winport: - fix crash when close the input config dialog and on exit (on systems where no feedback game devices); --- desmume/src/windows/inputdx.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/desmume/src/windows/inputdx.cpp b/desmume/src/windows/inputdx.cpp index c433f9adb..f1a642e89 100644 --- a/desmume/src/windows/inputdx.cpp +++ b/desmume/src/windows/inputdx.cpp @@ -466,8 +466,11 @@ INPUTCLASS::~INPUTCLASS() if (pJoystick != NULL) { - pEffect->Stop(); - pEffect->Release(); + if (pEffect) + { + pEffect->Stop(); + pEffect->Release(); + } pJoystick->Unacquire(); pJoystick->Release(); pJoystick = NULL;