From: Lars Op den Kamp Date: Tue, 14 Feb 2012 14:44:50 +0000 (+0100) Subject: LibCecSharp: set the callback methods in libcec to NULL before closing the connection... X-Git-Tag: upstream/2.2.0~1^2~35^2~54 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=7e24a7d2d1984468c562277965ab0768f5458549 LibCecSharp: set the callback methods in libcec to NULL before closing the connection, since these might already have been destroyed in .NET --- diff --git a/src/LibCecSharp/LibCecSharp.cpp b/src/LibCecSharp/LibCecSharp.cpp index c6f52a1..4e76ead 100644 --- a/src/LibCecSharp/LibCecSharp.cpp +++ b/src/LibCecSharp/LibCecSharp.cpp @@ -136,6 +136,8 @@ namespace CecSharp void Close(void) { + // delete the callbacks, since these might already have been destroyed in .NET + m_libCec->EnableCallbacks(NULL, NULL); m_libCec->Close(); }