Fixed problem with premature destruction of ZAssocChild object
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 23 Sep 2008 12:44:50 +0000 (14:44 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 23 Sep 2008 12:47:11 +0000 (14:47 +0200)
Fixed a problem where the ZAssocChild object could be destroyed in
failNotify method and later referenced in the result method.

src/filter_frontend_net.cpp

index ac85e41..71cd711 100644 (file)
@@ -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++;