From 621099e15d70866923f0f973bc02fbc851d77e3a Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Thu, 20 Dec 2007 11:49:03 +0000 Subject: [PATCH] Check for active requests before trying to receive a message --- contrib/ldapc++/src/LDAPMessageQueue.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/ldapc++/src/LDAPMessageQueue.cpp b/contrib/ldapc++/src/LDAPMessageQueue.cpp index b7afa50e16..6aed87b32b 100644 --- a/contrib/ldapc++/src/LDAPMessageQueue.cpp +++ b/contrib/ldapc++/src/LDAPMessageQueue.cpp @@ -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; -- 2.39.5