[Kst] branches/work/kst/portto4/kst/src/libkstmath

Mike Fenton mike at staikos.net
Tue Apr 29 21:06:24 CEST 2008


SVN commit 802528 by fenton:

Fix for disconnect errors.


 M  +12 -4     curve.cpp  


--- branches/work/kst/portto4/kst/src/libkstmath/curve.cpp #802527:802528
@@ -564,7 +564,9 @@
     _inputVectors[EXVECTOR] = new_ex;
     connect(new_ex, SIGNAL(vectorUpdated(QString, int)), this, SLOT(vectorUpdated(QString, int)));
   } else {
-    disconnect(_inputVectors[EXVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    if (_inputVectors[EXVECTOR]) {
+      disconnect(_inputVectors[EXVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    }
     _inputVectors.remove(EXVECTOR);
   }
   setDirty();
@@ -576,7 +578,9 @@
     _inputVectors[EYVECTOR] = new_ey;
     connect(new_ey, SIGNAL(vectorUpdated(QString, int)), this, SLOT(vectorUpdated(QString, int)));
   } else {
-    disconnect(_inputVectors[EYVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    if (_inputVectors[EYVECTOR]) {
+      disconnect(_inputVectors[EYVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    }
     _inputVectors.remove(EYVECTOR);
   }
   setDirty();
@@ -588,7 +592,9 @@
     _inputVectors[EXMINUSVECTOR] = new_ex;
     connect(new_ex, SIGNAL(vectorUpdated(QString, int)), this, SLOT(vectorUpdated(QString, int)));
   } else {
-    disconnect(_inputVectors[EXMINUSVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    if (_inputVectors[EXMINUSVECTOR]) {
+      disconnect(_inputVectors[EXMINUSVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    }
     _inputVectors.remove(EXMINUSVECTOR);
   }
   setDirty();
@@ -600,7 +606,9 @@
     _inputVectors[EYMINUSVECTOR] = new_ey;
     connect(new_ey, SIGNAL(vectorUpdated(QString, int)), this, SLOT(vectorUpdated(QString, int)));
   } else {
-    disconnect(_inputVectors[EYMINUSVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    if (_inputVectors[EYMINUSVECTOR]) {
+      disconnect(_inputVectors[EYMINUSVECTOR], SIGNAL(vectorUpdated(QString, int)));
+    }
     _inputVectors.remove(EYMINUSVECTOR);
   }
   setDirty();


More information about the Kst mailing list