diff --git a/source/cell/cell.cpp b/source/cell/cell.cpp index 0dd78fd0..797c170c 100644 --- a/source/cell/cell.cpp +++ b/source/cell/cell.cpp @@ -490,8 +490,11 @@ std::string cell::formula() const void cell::clear_formula() { - d_->formula_.clear(); - worksheet().garbage_collect_formulae(); + if (has_formula()) + { + d_->formula_.clear(); + worksheet().garbage_collect_formulae(); + } } void cell::error(const std::string &error)