From: Adam Dickmeiss Date: Tue, 23 Sep 2008 12:44:50 +0000 (+0200) Subject: Fixed problem with premature destruction of ZAssocChild object X-Git-Tag: v1.0.15~14 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=0ff334ae8fc0ece70218688fe603c5de41a48aee;p=metaproxy-moved-to-github.git Fixed problem with premature destruction of ZAssocChild object Fixed a problem where the ZAssocChild object could be destroyed in failNotify method and later referenced in the result method. --- diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index ac85e41..71cd711 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -219,7 +219,8 @@ void mp::ZAssocChild::failNotify() // TODO: send Package to signal "close" if (m_session.is_closed()) { - delete this; + if (m_no_requests == 0) + delete this; return; } m_no_requests++;