[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Thu Oct 20 02:35:06 CEST 2005
SVN commit 472150 by staikos:
don't crash trying to interpolate size < 2 vectors
M +6 -1 kstvector.cpp
--- trunk/extragear/graphics/kst/kst/kstvector.cpp #472149:472150
@@ -106,8 +106,13 @@
#define GENERATE_INTERPOLATION \
+ assert(_size > 0); \
+ if (_size == 0) { \
+ return KST::NOPOINT; \
+ } \
+ \
/** Limits checks - optional? **/ \
- if (in_i < 0) { \
+ if (in_i < 0 || _size == 1) { \
return _v[0]; \
} \
\
More information about the Kst
mailing list