diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-14 22:37:01 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-14 22:37:01 -0800 |
commit | d2c436e49ae0e870015b106713a711d9356c39cb (patch) | |
tree | 690930cecf0ea645244f5db35a87da1dda576db2 /includes | |
parent | 060c3334823e5eccf172a97749a0a6aecd6bb16a (diff) |
Making sure the typecasting on Handles worked properly.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Handle.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/Handle.h b/includes/Handle.h index 1d659a9..4ac8991 100644 --- a/includes/Handle.h +++ b/includes/Handle.h @@ -80,7 +80,7 @@ class IO : public IOBase { template<class U> IO(const IO<U> & io) { if (io.m_h) setHandle(io.m_h); } IO<T> & operator=(const IO<T> & io) { if (m_h) m_h->delRef(); setHandle(io.m_h); return *this; } - T * operator->() { Assert(m_h); return dynamic_cast<T *>(m_h); } + T * operator->() { Assert(m_h); T * r = dynamic_cast<T *>(m_h); Assert(r); return r; } bool isNull() { return dynamic_cast<T *>(m_h); } }; |