LibCecSharp: set the callback methods in libcec to NULL before closing the connection...
[deb_libcec.git] / src / LibCecSharp / LibCecSharp.cpp
index c6f52a1a17b2bda673177728538602c81421b669..4e76ead7a6ab264252ef97040448e9909fb93729 100644 (file)
@@ -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();
                }