[Sheet] Assert non-null pointer before using it

This commit is contained in:
0penBrain
2021-11-19 16:25:36 +01:00
committed by Chris Hennes
parent 0e13882a65
commit 28d10fc6e6

View File

@@ -524,12 +524,11 @@ void PropertySheet::setAlias(CellAddress address, const std::string &alias)
const Cell * aliasedCell = getValueFromAlias(alias);
Cell * cell = nonNullCellAt(address);
assert(cell != 0);
if (aliasedCell != 0 && cell != aliasedCell)
throw Base::ValueError("Alias already defined.");
assert(cell != 0);
/* Mark cells depending on this cell dirty; they need to be resolved when an alias changes or disappears */
std::string fullName = owner->getFullName() + "." + address.toString();