From: Georg Baum Date: Mon, 13 Apr 2015 19:07:05 +0000 (+0200) Subject: Make static variable non-static X-Git-Tag: 2.2.0alpha1~890 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b0e387e013b7f247074e82fd466d533cdc6dcd56;p=features.git Make static variable non-static This is still a hack, but a less dangerous one. The old code had a problem if it was called from different threads, or if for some reason it would get called recursively. --- diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp index 2d29f520e9..7a75a4f2b3 100644 --- a/src/mathed/MacroTable.cpp +++ b/src/mathed/MacroTable.cpp @@ -68,8 +68,7 @@ bool MacroData::expand(vector const & args, MathData & to) const updateData(); // Hack. Any inset with a cell would do. - static InsetMathSqrt inset(0); - inset.setBuffer(const_cast(*buffer_)); + InsetMathSqrt inset(const_cast(buffer_)); docstring const & definition(display_.empty() ? definition_ : display_); asArray(definition, inset.cell(0));