]> git.sur5r.net Git - openldap/commitdiff
Check for active requests before trying to receive a message
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 11 Feb 2008 20:06:12 +0000 (20:06 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 11 Feb 2008 20:06:12 +0000 (20:06 +0000)
contrib/ldapc++/src/LDAPMessageQueue.cpp

index b7afa50e16d78ed29beae9ecd2d7769704b7306f..6aed87b32b9e79bb5cfc09860071d8dc539ae06d 100644 (file)
@@ -39,6 +39,10 @@ LDAPMessageQueue::~LDAPMessageQueue(){
 LDAPMsg *LDAPMessageQueue::getNext(){
     DEBUG(LDAP_DEBUG_TRACE,"LDAPMessageQueue::getNext()" << endl);
 
+    if ( m_activeReq.empty() ) {
+        return 0;
+    }
+
     LDAPRequest *req=m_activeReq.top();
     LDAPMsg *ret=0;