X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=nodestack.cc;h=515a2d313abbee54abbd132057100c89f9f711fc;hb=9fe0f14ceaf30ca99ce7a58aba8c49bb9b351f71;hp=00cc30f8d7efb22cf9e5b110d4628ac83db55e0f;hpb=2daff868a7ef4f6235c2776b746cec9947a87b13;p=model-checker.git diff --git a/nodestack.cc b/nodestack.cc index 00cc30f..515a2d3 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -458,8 +458,7 @@ void Node::add_read_from_promise(const ModelAction *reader) */ Promise * Node::get_read_from_promise() const { - if (read_from_promise_idx < 0 || read_from_promise_idx >= ((int)read_from_promises.size())) - return NULL; + ASSERT(read_from_promise_idx >= 0 && read_from_promise_idx < ((int)read_from_promises.size())); return read_from_promises[read_from_promise_idx]->get_reads_from_promise(); }