[Kst] branches/work/kst/1.1/kst/kst

George Staikos staikos at kde.org
Mon Aug 8 06:25:12 CEST 2005


SVN commit 443964 by staikos:

backport fix for locking in the equation interpreter


 M  +4 -1      enodes.cpp  


--- branches/work/kst/1.1/kst/kst/enodes.cpp #443963:443964
@@ -54,12 +54,13 @@
     return 0.0;
   }
 
+  mutex().lock();
   yy_scan_string(txt);
   int rc = yyparse();
   if (rc == 0) {
-    QMutexLocker ml(&mutex());
     Equation::Node *eq = static_cast<Equation::Node*>(ParsedEquation);
     ParsedEquation = 0L;
+    mutex().unlock();
     Equation::Context ctx;
     ctx.sampleCount = 2;
     ctx.noPoint = KST::NOPOINT;
@@ -73,6 +74,8 @@
     }
     return v;
   } else {
+    ParsedEquation = 0L;
+    mutex().unlock();
     if (ok) {
       *ok = false;
     }


More information about the Kst mailing list