[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri May 16 17:28:40 CEST 2003
CVS commit by staikos:
for now, just don't crash until the code is complete
M +25 -10 kstplugin.cpp 1.5
--- kdeextragear-2/kst/kst/kstplugin.cpp #1.4:1.5
@@ -94,7 +94,7 @@ void KstPlugin::update() {
}
- int *inArrayLens, *outArrayLens;
- double *inScalars, *outScalars;
- double **inVectors, **outVectors;
+ int *inArrayLens = 0L, *outArrayLens = 0L;
+ double *inScalars = 0L, *outScalars = 0L;
+ double **inVectors = 0L, **outVectors = 0L;
unsigned inArrayCnt = 0, outArrayCnt = 0, inScalarCnt = 0, outScalarCnt = 0;
@@ -103,10 +103,21 @@ void KstPlugin::update() {
countScalarsAndVectors(_plugin->data()._outputs, outScalarCnt, outArrayCnt);
+ if (inArrayCnt > 0) {
inArrayLens = new int[inArrayCnt];
+ inVectors = new double*[inArrayCnt];
+ }
+
+ if (outArrayCnt > 0) {
outArrayLens = new int[outArrayCnt];
+ outVectors = new double*[outArrayCnt];
+ }
+
+ if (inScalarCnt > 0) {
inScalars = new double[inScalarCnt];
+ }
+
+ if (outScalarCnt > 0) {
outScalars = new double[outScalarCnt];
- inVectors = new double*[inArrayCnt];
- outVectors = new double*[outArrayCnt];
+ }
for (unsigned i = 0; i < inArrayCnt; i++) {
@@ -122,4 +133,5 @@ void KstPlugin::update() {
}
+#if 0
int rc = _plugin->call(inVectors, inArrayLens, inScalars,
outVectors, outArrayLens, outScalars);
@@ -128,4 +140,7 @@ void KstPlugin::update() {
// Error
}
+#endif
+
+ // FIXME: delete output arrays
for (unsigned i = 0; i < inArrayCnt; i++) {
More information about the Kst
mailing list