about summary refs log tree commit diff
path: root/linuxthreads_db/td_ta_set_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads_db/td_ta_set_event.c')
-rw-r--r--linuxthreads_db/td_ta_set_event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linuxthreads_db/td_ta_set_event.c b/linuxthreads_db/td_ta_set_event.c
index f783d7567e..4d87fe1b55 100644
--- a/linuxthreads_db/td_ta_set_event.c
+++ b/linuxthreads_db/td_ta_set_event.c
@@ -31,6 +31,10 @@ td_ta_set_event (ta, event)
 
   LOG (__FUNCTION__);
 
+  /* Test whether the TA parameter is ok.  */
+  if (! ta_ok (ta))
+    return TD_BADTA;
+
   /* Write the new value into the thread data structure.  */
   if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
 		 &old_event, sizeof (td_thrhandle_t)) != PS_OK)