Commit d4a31b25 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Prevent crash

Only call canRemove if vars is actually present
parent f1ece754
......@@ -67,8 +67,7 @@ void VarEdit::setName(const QString& newVar)
else {
m_exp->setExpression(Analitza::Expression(vars->value(newVar)->copy()));
}
m_removeBtn->setEnabled(canRemove(newVar));
m_removeBtn->setEnabled(vars && canRemove(newVar));
}
bool VarEdit::canRemove(const QString& name) const
......
Markdown is supported
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