summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/2geom/sbasis-to-bezier.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/2geom/sbasis-to-bezier.cpp b/src/2geom/sbasis-to-bezier.cpp
index ce5bf89bc..0a5441254 100644
--- a/src/2geom/sbasis-to-bezier.cpp
+++ b/src/2geom/sbasis-to-bezier.cpp
@@ -99,6 +99,10 @@ int sgn(unsigned int j, unsigned int k)
*/
void sbasis_to_bezier (Bezier & bz, SBasis const& sb, size_t sz)
{
+ if (sb.size() == 0) {
+ THROW_RANGEERROR("size of sb is too small");
+ }
+
size_t q, n;
bool even;
if (sz == 0)