Index: /trunk/nv/core/handle.hh
===================================================================
--- /trunk/nv/core/handle.hh	(revision 338)
+++ /trunk/nv/core/handle.hh	(revision 339)
@@ -103,4 +103,13 @@
 		{
 			std::swap( m_entries[ h1.index() ].index, m_entries[ h2.index() ].index );
+		}
+
+		bool is_valid( handle h ) const
+		{
+			typedef handle_operator<HANDLE> hop; 
+			if ( h.is_nil() ) return false;
+			if ( h.index() >= m_entries.size() ) return false;
+			const index_entry& entry = m_entries[ h.index() ];
+			return entry.index >= 0 && entry.counter == hop::get_counter(h);
 		}
 
@@ -183,4 +192,6 @@
 		void remove( handle h )
 		{
+			if ( h.is_nil() || h.index() >= m_indexes.size() || m_indexes[h.index()] == -1 ) 
+				return;
 			handle swap_handle    = m_handles.back();
 			sint32 dead_eindex    = m_indexes[ h.index() ];
@@ -259,4 +270,9 @@
 			m_handles.push_back( m_indexes.create_handle( sint32( m_data.size() - 1 ) ) );
 			return m_handles.back();
+		}
+
+		bool is_valid( handle h )
+		{
+			return m_indexes.is_valid(h);
 		}
 
