diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-07-04 16:08:54 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-07-04 16:08:54 +0200 |
commit | 342b3facf3f0605ae25ca28a0704e26d6ca23237 (patch) | |
tree | 939533f3db1bd872c9c3e4421def2145f6eb0dd3 /cpp/src | |
parent | Fixed ICE-5355 - no longer link with ncurses (diff) | |
download | ice-342b3facf3f0605ae25ca28a0704e26d6ca23237.tar.bz2 ice-342b3facf3f0605ae25ca28a0704e26d6ca23237.tar.xz ice-342b3facf3f0605ae25ca28a0704e26d6ca23237.zip |
Fixed ICE-5336 - findAllReplicas causing crash if replica group empty
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/QueryI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/QueryI.cpp b/cpp/src/IceGrid/QueryI.cpp index f2a7474c046..567857f2b4a 100644 --- a/cpp/src/IceGrid/QueryI.cpp +++ b/cpp/src/IceGrid/QueryI.cpp @@ -87,9 +87,9 @@ QueryI::findAllReplicas(const Ice::ObjectPrx& proxy, const Ice::Current&) const try { AdapterInfoSeq infos = _database->getAdapterInfo(prx->ice_getAdapterId()); - assert(!infos.empty()); - if(infos[0].replicaGroupId != prx->ice_getAdapterId()) // The adapter id doesn't refer to a replica group. + if(infos.empty() || infos[0].replicaGroupId != prx->ice_getAdapterId()) { + // The adapter id doesn't refer to a replica group or the replica group is empty. return Ice::ObjectProxySeq(); } |