From: Lars Op den Kamp Date: Mon, 6 Feb 2012 13:04:04 +0000 (+0100) Subject: cec: fixed crash on exit in LibCecSharp X-Git-Tag: upstream/2.2.0~1^2~36^2~1 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=5d6aa900aa6b334d15d953cfde353baff8d462e2 cec: fixed crash on exit in LibCecSharp --- diff --git a/src/LibCecSharp/LibCecSharp.cpp b/src/LibCecSharp/LibCecSharp.cpp index 6b1ba7a..06a98aa 100644 --- a/src/LibCecSharp/LibCecSharp.cpp +++ b/src/LibCecSharp/LibCecSharp.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -588,7 +588,7 @@ public: ~LibCecSharp(void) { - CECDestroy(m_libCec); + Close(); DestroyDelegates(); m_libCec = NULL; } @@ -596,7 +596,7 @@ public: protected: !LibCecSharp(void) { - CECDestroy(m_libCec); + Close(); DestroyDelegates(); m_libCec = NULL; } @@ -950,6 +950,8 @@ public: private: void DestroyDelegates() { + m_bHasCallbacks = false; + delete m_callbacks; m_logMessageGCHandle.Free(); m_keypressGCHandle.Free(); m_commandGCHandle.Free();