From d2c436e49ae0e870015b106713a711d9356c39cb Mon Sep 17 00:00:00 2001
From: Pixel <pixel@nobis-crew.org>
Date: Mon, 14 Nov 2011 22:37:01 -0800
Subject: Making sure the typecasting on Handles worked properly.

---
 includes/Handle.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'includes')

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); }
 };
 
-- 
cgit v1.2.3