From 5ca371bb9a65cc322eb8327d81709985daefe173 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 23 Aug 2016 13:20:43 +0200 Subject: cUrlClient: Exported to Lua API. --- src/OSSupport/TCPLinkImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/OSSupport/TCPLinkImpl.cpp') diff --git a/src/OSSupport/TCPLinkImpl.cpp b/src/OSSupport/TCPLinkImpl.cpp index df70f3f72..d55dc9da1 100644 --- a/src/OSSupport/TCPLinkImpl.cpp +++ b/src/OSSupport/TCPLinkImpl.cpp @@ -322,6 +322,11 @@ void cTCPLinkImpl::EventCallback(bufferevent * a_BufferEvent, short a_What, void { ASSERT(a_Self != nullptr); cTCPLinkImplPtr Self = static_cast(a_Self)->m_Self; + if (Self == nullptr) + { + // The link has already been freed + return; + } // If an error is reported, call the error callback: if (a_What & BEV_EVENT_ERROR) -- cgit v1.2.3