commit b59e1bd79b648a8249e734aa46d42a5c0044aad5
Author: Georg Baum <[email protected]>
Date:   Fri May 8 21:52:55 2015 +0200

    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 98ce7ee..78b42b5 100644
--- a/src/mathed/MacroTable.cpp
+++ b/src/mathed/MacroTable.cpp
@@ -68,8 +68,7 @@ bool MacroData::expand(vector<MathData> const & args, 
MathData & to) const
        updateData();
 
        // Hack. Any inset with a cell would do.
-       static InsetMathSqrt inset(0);
-       inset.setBuffer(const_cast<Buffer &>(*buffer_));
+       InsetMathSqrt inset(const_cast<Buffer *>(buffer_));
 
        docstring const & definition(display_.empty() ? definition_ : display_);
        asArray(definition, inset.cell(0));

Reply via email to