From: Lars Op den Kamp Date: Thu, 2 Aug 2012 15:47:51 +0000 (+0200) Subject: cec: added guard so ReplaceHandler() doesn't accidently try to replace a handler... X-Git-Tag: upstream/2.2.0~1^2~19^2^2~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=880f082e02a4d031ce226e7182a1c93c6e4e9652;p=deb_libcec.git cec: added guard so ReplaceHandler() doesn't accidently try to replace a handler for the broadcast address --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index 5b3e2cb..466e977 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -95,6 +95,9 @@ CCECBusDevice::~CCECBusDevice(void) bool CCECBusDevice::ReplaceHandler(bool bActivateSource /* = true */) { + if (m_iLogicalAddress == CECDEVICE_BROADCAST) + return false; + bool bInitHandler(false); { CLockObject lock(m_mutex);