[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Tue Nov 1 06:29:35 CET 2005


SVN commit 476315 by staikos:

add missing locking


 M  +4 -6      kstmatrixdialog_i.cpp  


--- trunk/extragear/graphics/kst/kst/kstmatrixdialog_i.cpp #476314:476315
@@ -575,8 +575,6 @@
 
 
 bool KstMatrixDialogI::editObject() {
-  KstMatrixList mxList = KST::matrixList;
-
   // if editing multiple objects, edit each one
   if (_editMultipleMode) {
     _fileNameDirty = !_w->_fileName->url().isEmpty();
@@ -600,13 +598,13 @@
     for (uint i = 0; i < _editMultipleWidget->_objectList->count(); i++) {
       if (_editMultipleWidget->_objectList->isSelected(i)) {
         // get the pointer to the object
-        KstMatrixList::Iterator mxIter = mxList.findTag(_editMultipleWidget->_objectList->text(i));
-        if (mxIter == mxList.end()) {
+        KST::matrixList.lock().readLock();
+        KstMatrixPtr mxPtr = *KST::matrixList.findTag(_editMultipleWidget->_objectList->text(i));
+        KST::matrixList.lock().readUnlock();
+        if (!mxPtr) {
           return false;
         }
 
-        KstMatrixPtr mxPtr = *mxIter;
-
         if (!editSingleObject(mxPtr)) {
           return false;
         }


More information about the Kst mailing list