Two change:
[c11tester.git] / model.cc
index 9dc1d37..a22e021 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -658,7 +658,8 @@ Thread * ModelChecker::check_current_action(ModelAction *curr)
                        bool updated = false;
 
                        if (act->is_read()) {
                        bool updated = false;
 
                        if (act->is_read()) {
-                               if (r_modification_order(act, act->get_reads_from()))
+                               const ModelAction *rf = act->get_reads_from();
+                               if (rf != NULL && r_modification_order(act, rf))
                                        updated = true;
                        }
                        if (act->is_write()) {
                                        updated = true;
                        }
                        if (act->is_write()) {