[Reactor] Avoid a segfault when using phases with no Kinetics
This commit is contained in:
parent
990a0b5491
commit
205706f5dd
3 changed files with 5 additions and 2 deletions
|
|
@ -78,6 +78,8 @@ public:
|
|||
m_kin = &kin;
|
||||
if (m_kin->nReactions() == 0) {
|
||||
disableChemistry();
|
||||
} else {
|
||||
enableChemistry();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@ cdef class Reactor(ReactorBase):
|
|||
def insert(self, _SolutionBase solution):
|
||||
ReactorBase.insert(self, solution)
|
||||
self._kinetics = solution
|
||||
self.reactor.setKineticsMgr(deref(solution.kinetics))
|
||||
if solution.kinetics != NULL:
|
||||
self.reactor.setKineticsMgr(deref(solution.kinetics))
|
||||
|
||||
property kinetics:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Reactor::Reactor() : ReactorBase(),
|
|||
m_kin(0),
|
||||
m_vdot(0.0),
|
||||
m_Q(0.0),
|
||||
m_chem(true),
|
||||
m_chem(false),
|
||||
m_energy(true),
|
||||
m_nsens(npos)
|
||||
{}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue