summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Refcountable_Guard_T.inl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Refcountable_Guard_T.inl')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Refcountable_Guard_T.inl18
1 files changed, 16 insertions, 2 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Refcountable_Guard_T.inl b/TAO/orbsvcs/orbsvcs/Notify/Refcountable_Guard_T.inl
index 5e16e7d04f1..2dedf719c60 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Refcountable_Guard_T.inl
+++ b/TAO/orbsvcs/orbsvcs/Notify/Refcountable_Guard_T.inl
@@ -4,23 +4,37 @@ template <class T> ACE_INLINE
TAO_Notify_Refcountable_Guard_T<T>::TAO_Notify_Refcountable_Guard_T (T *t)
: t_ (t)
{
- this->t_->_incr_refcnt ();
+ if (this->t_ != 0)
+ {
+ this->t_->_incr_refcnt ();
+ }
}
template <class T> ACE_INLINE
TAO_Notify_Refcountable_Guard_T<T>::~TAO_Notify_Refcountable_Guard_T ()
{
- this->t_->_decr_refcnt ();
+ if (this->t_ != 0)
+ {
+ this->t_->_decr_refcnt ();
+ }
+}
+
+template <class T> ACE_INLINE T*
+TAO_Notify_Refcountable_Guard_T<T>::get (void) const
+{
+ return this->t_;
}
template <class T> ACE_INLINE T*
TAO_Notify_Refcountable_Guard_T<T>::operator-> (void) const
{
+ ACE_ASSERT (this->t_ != 0);
return this->t_;
}
template <class T> ACE_INLINE T&
TAO_Notify_Refcountable_Guard_T<T>::operator *(void) const
{
+ ACE_ASSERT (this->t_ != 0);
return *this->t_;
}