[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri Oct 22 16:22:22 CEST 2004
CVS commit by staikos:
Now I know how to trigger this assert, but it doesn't look like there's an
easy way around it for now. We just have to deal with null xVector in the
equation nodes for now. This change -might- break loading of equations with
plugins that use "x".
M +6 -0 enodes.cpp 1.27
M +3 -1 kstequation.cpp 1.11
--- kdeextragear-2/kst/kst/enodes.cpp #1.26:1.27
@@ -365,4 +365,9 @@ KstObject::UpdateType Function::update(i
Identifier *pn = dynamic_cast<Identifier*>(_args->node(cnt + 1));
if (pn && 0 == strcmp(pn->name(), "x")) {
+ if (!ctx->xVector) {
+ _outputIndex = -424242;
+ // Hope we recover later
+ return KstObject::NO_CHANGE;
+ }
_inVectors[vitcnt] = ctx->xVector->value();
_inArrayLens[vitcnt++] = ctx->xVector->length();
@@ -620,4 +625,5 @@ void Data::collectVectors(KstVectorList&
KstObject::UpdateType Data::update(int counter, Context *ctx) {
+ Q_UNUSED(ctx)
if (_vector) {
return _vector->update(counter);
--- kdeextragear-2/kst/kst/kstequation.cpp #1.10:1.11
@@ -226,6 +226,8 @@ void KstEquation::save(QTextStream &ts,
}
+
void KstEquation::setEquation(const QString& in_fn) {
- assert(*_xVector);
+ // assert(*_xVector); - ugly, we have to allow this here due to
+ // document loading with vector lazy-loading
_equation = in_fn;
VectorsUsed.clear();
More information about the Kst
mailing list