more bug fixes
authorBrian Demsky <bdemsky@uci.edu>
Tue, 7 Apr 2020 22:57:11 +0000 (15:57 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Tue, 7 Apr 2020 22:57:11 +0000 (15:57 -0700)
actionlist.cc

index 3ffaa38..e76f5ae 100644 (file)
@@ -168,8 +168,8 @@ void decrementCount(allnode * ptr) {
                                        decrementCount(ptr->parent);
                                }
                        }
+                       delete ptr;
                }
-               delete ptr;
        }
 }
 
@@ -204,7 +204,7 @@ void actionlist::removeAction(ModelAction * act) {
                                                }
                                                if (first) {
                                                        //see if previous node has same clock as us...
-                                                       if (llnodeprev->val->get_seq_number() == clock) {
+                                                       if (llnodeprev != NULL && llnodeprev->val->get_seq_number() == clock) {
                                                                ptr->children[index] = reinterpret_cast<allnode *>(((uintptr_t)llnodeprev) | ISACT);
                                                        } else {
                                                                //remove ourselves and go up tree