From 5d6aa900aa6b334d15d953cfde353baff8d462e2 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 6 Feb 2012 14:04:04 +0100 Subject: [PATCH] cec: fixed crash on exit in LibCecSharp --- src/LibCecSharp/LibCecSharp.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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(); -- 2.34.1