Lock model check when we terminate proxy thread
[c11tester.git] / action.cc
index c9b920c8e6299ac514290d239e4b64bbc06c7d4d..72cf97246765403360275604d1076501e4a94bf7 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -49,7 +49,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
        ASSERT(loc || type == ATOMIC_FENCE || type == NOOP);
 
        Thread *t = thread ? thread : thread_current();
-       this->tid = t->get_id();
+       this->tid = t!= NULL ? t->get_id() : -1;
 }