[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Mon Jul 7 20:07:47 CEST 2003


CVS commit by staikos: 

just return garbage instead of crashing


  M +8 -2      kstplugin.cpp   1.35


--- kdeextragear-2/kst/kst/kstplugin.cpp  #1.34:1.35
@@ -138,6 +138,8 @@ KstObject::UpdateType KstPlugin::update(
 
   for (unsigned i = 0; i < inArrayCnt; i++) {
-    if (!_inputVectors[i].data())
-      kdFatal() << "Vector " << i << " is invalid.  Cannot load." << endl;
+    if (!_inputVectors[i].data()) {
+      kdWarning() << "Input vector " << i << " is invalid.  Cannot continue." << endl;
+      return NO_CHANGE;
+    }
     inVectors[i] = _inputVectors[i]->value();
     inArrayLens[i] = _inputVectors[i]->sampleCount();
@@ -149,4 +151,8 @@ KstObject::UpdateType KstPlugin::update(
 
   for (unsigned i = 0; i < outArrayCnt; i++) {
+    if (!_outputVectors[i].data()) {
+      kdWarning() << "Ouptut vector " << i << " is invalid.  Cannot continue." << endl;
+      return NO_CHANGE;
+    }
     outVectors[i] = _outputVectors[i]->value();
     outArrayLens[i] = 1;




More information about the Kst mailing list