summaryrefslogtreecommitdiffstats
path: root/src/2geom/sbasis.cpp
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2015-09-06 17:27:05 +0000
committerapenner <penner@vaxxine.com>2015-09-06 17:27:05 +0000
commit6496542f5a66b053f4f4a73ac9369262205f7dbf (patch)
tree7472ee245699cef064e8cddae871f7ed818c185c /src/2geom/sbasis.cpp
parentAttempt to fix 1417173 (undo duplicate gradient crash) (diff)
downloadinkscape-6496542f5a66b053f4f4a73ac9369262205f7dbf.tar.gz
inkscape-6496542f5a66b053f4f4a73ac9369262205f7dbf.zip
for a zero sbasis, set the size to 1. (Bug 1478168)
Fixed bugs: - https://launchpad.net/bugs/1478168 (bzr r14346)
Diffstat (limited to 'src/2geom/sbasis.cpp')
-rw-r--r--src/2geom/sbasis.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/2geom/sbasis.cpp b/src/2geom/sbasis.cpp
index 42d92d7b8..0f4159e94 100644
--- a/src/2geom/sbasis.cpp
+++ b/src/2geom/sbasis.cpp
@@ -279,9 +279,11 @@ SBasis multiply_add(SBasis const &a, SBasis const &b, SBasis c) {
*/
SBasis multiply(SBasis const &a, SBasis const &b) {
- SBasis c(a.size() + b.size(), Linear(0,0));
- if(a.isZero() || b.isZero())
+ if(a.isZero() || b.isZero()) {
+ SBasis c(1, Linear(0,0));
return c;
+ }
+ SBasis c(a.size() + b.size(), Linear(0,0));
return multiply_add(a, b, c);
}
#endif