Fix failure in non-assertion builds on incorrect SmtEngine use.
authorMorgan Deters <mdeters@cs.nyu.edu>
Fri, 21 Jun 2013 15:15:57 +0000 (11:15 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Fri, 21 Jun 2013 15:15:57 +0000 (11:15 -0400)
src/smt/smt_engine.cpp

index 76d4c973fe0985ff3a58615770e1d1653ff48c62..411d4ee3f0c88f75b39a801786473265e91b0590 100644 (file)
@@ -791,6 +791,9 @@ SmtEngine::~SmtEngine() throw() {
 
 void SmtEngine::setLogic(const LogicInfo& logic) throw(ModalException) {
   SmtScope smts(this);
+  if(d_fullyInited) {
+    throw ModalException("Cannot set logic in SmtEngine after the engine has finished initializing");
+  }
   d_logic = logic;
   setLogicInternal();
 }