From: Johan Engelen Date: Fri, 25 Jun 2010 21:56:06 +0000 (+0200) Subject: throw exception when sbasis is empty X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f24cd5f460a54b42dbed3bae1c52825875ffaa1;p=inkscape.git throw exception when sbasis is empty --- 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)