Commit 963b50e0 authored by Yumin Yuan's avatar Yumin Yuan
Browse files

More thorough null checking in Operator

parent fec3c650
......@@ -53,11 +53,12 @@ Operator::Operator()
/// Destructor. Removes its specification() from the session's operator system.
Operator::~Operator()
{
if (this->m_session)
if (this->m_session &&
this->m_session->operatorSystem() &&
this->m_specification)
{
if (this->m_specification)
this->session()->operatorSystem()->removeAttribute(
this->m_specification);
this->m_session->operatorSystem()->removeAttribute(
this->m_specification);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment