diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2020-08-18 17:27:36 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2020-08-18 17:27:36 +0100 |
commit | 8d1aa99e80f7354af4810e563649ca1ee31f2e1a (patch) | |
tree | 5ce8a88442e40be9ad582000b8d2bf2cab59b18f /indra/newview/llviewerjoystick.cpp | |
parent | cef702d0c57e5bb4f0debfba677d1fd5a9694364 (diff) | |
parent | e8b31d03b4f6f0ffb981b4ea150743daf7b4a958 (diff) |
Merge remote-tracking branch 'origin/master' into SL-13705
Diffstat (limited to 'indra/newview/llviewerjoystick.cpp')
-rw-r--r-- | indra/newview/llviewerjoystick.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index 3d06c95080..491ad7e3b2 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -309,10 +309,13 @@ void LLViewerJoystick::init(bool autoenable) void LLViewerJoystick::terminate() { #if LIB_NDOF - - ndof_libcleanup(); - LL_INFOS("joystick") << "Terminated connection with NDOF device." << LL_ENDL; - mDriverState = JDS_UNINITIALIZED; + if (mNdofDev != NULL) + { + ndof_libcleanup(); // frees alocated memory in mNdofDev + mDriverState = JDS_UNINITIALIZED; + mNdofDev = NULL; + LL_INFOS("joystick") << "Terminated connection with NDOF device." << LL_ENDL; + } #endif } |