summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Allocatable.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-06-19 18:37:23 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-06-19 18:37:23 +0000
commitb5af15a64ed214872a890de6406f3f827ade402a (patch)
treeb13cfd627fb93155958916e3314d3a606e27fc86 /cpp/src/IceGrid/Allocatable.cpp
parentFixed bug 1099 (diff)
downloadice-b5af15a64ed214872a890de6406f3f827ade402a.tar.bz2
ice-b5af15a64ed214872a890de6406f3f827ade402a.tar.xz
ice-b5af15a64ed214872a890de6406f3f827ade402a.zip
Fixed bug 1095
Diffstat (limited to 'cpp/src/IceGrid/Allocatable.cpp')
-rw-r--r--cpp/src/IceGrid/Allocatable.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/Allocatable.cpp b/cpp/src/IceGrid/Allocatable.cpp
index d374c3fb8f5..eaea2acadfe 100644
--- a/cpp/src/IceGrid/Allocatable.cpp
+++ b/cpp/src/IceGrid/Allocatable.cpp
@@ -148,10 +148,16 @@ AllocationRequest::AllocationRequest(const SessionIPtr& session) :
Allocatable::Allocatable(bool allocatable, const AllocatablePtr& parent) :
_allocatable(allocatable || parent && parent->isAllocatable()),
- _parent((parent && parent->isAllocatable()) ? parent : AllocatablePtr()),
_count(0),
_releasing(false)
{
+ //
+ // COMPILERFIX: the initializaton _parent((parent && parent->isAllocatable()) ? parent : AllocatablePtr()) doesn't work on HP-UX. It results in a SEGFAULT at runtime.
+ //
+ if(parent && parent->isAllocatable())
+ {
+ const_cast<AllocatablePtr&>(_parent) = parent;
+ }
assert(!_parent || _parent->isAllocatable()); // Parent is only set if it's allocatable.
}