Check the obvious ..


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4133 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_threadstate.c b/coregrind/m_threadstate.c
index 6c426bd..c5e0c86 100644
--- a/coregrind/m_threadstate.c
+++ b/coregrind/m_threadstate.c
@@ -60,6 +60,7 @@
 ThreadState *VG_(get_ThreadState)(ThreadId tid)
 {
    vg_assert(tid >= 0 && tid < VG_N_THREADS);
+   vg_assert(VG_(threads)[tid].tid == tid);
    return &VG_(threads)[tid];
 }