diff options
Diffstat (limited to 'cpp/src/IceGrid/Allocatable.cpp')
-rw-r--r-- | cpp/src/IceGrid/Allocatable.cpp | 8 |
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. } |