From 9f24cd5f460a54b42dbed3bae1c52825875ffaa1 Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Fri, 25 Jun 2010 23:56:06 +0200 Subject: [PATCH] throw exception when sbasis is empty --- src/2geom/sbasis-to-bezier.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.30.2