summaryrefslogtreecommitdiff
path: root/includes/Handle.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-14 22:37:01 -0800
committerPixel <pixel@nobis-crew.org>2011-11-14 22:37:01 -0800
commitd2c436e49ae0e870015b106713a711d9356c39cb (patch)
tree690930cecf0ea645244f5db35a87da1dda576db2 /includes/Handle.h
parent060c3334823e5eccf172a97749a0a6aecd6bb16a (diff)
Making sure the typecasting on Handles worked properly.
Diffstat (limited to 'includes/Handle.h')
-rw-r--r--includes/Handle.h2
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); }
};