]> git.sur5r.net Git - openldap/commitdiff
Check for active requests before trying to receive a message
authorRalf Haferkamp <ralf@openldap.org>
Thu, 20 Dec 2007 11:49:03 +0000 (11:49 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Thu, 20 Dec 2007 11:49:03 +0000 (11:49 +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;