diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-10-15 10:38:14 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-10-15 10:38:14 +0000 |
| commit | a641d41ce5d8b2b48703a4cad5d61aac3417f89a (patch) | |
| tree | ec425bc536bc9daf5883b8c6dbcb2f6a4dd092ce /src/livarot/PathSimplify.cpp | |
| parent | Extensions: Fix file test when checking dependencies by type (diff) | |
| download | inkscape-a641d41ce5d8b2b48703a4cad5d61aac3417f89a.tar.gz inkscape-a641d41ce5d8b2b48703a4cad5d61aac3417f89a.zip | |
Fix crash caused by e6d70fa8d497b2d75a837aa22e5876943de9fede
Diffstat (limited to 'src/livarot/PathSimplify.cpp')
| -rw-r--r-- | src/livarot/PathSimplify.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/livarot/PathSimplify.cpp b/src/livarot/PathSimplify.cpp index 5fefc3adc..bf3e200da 100644 --- a/src/livarot/PathSimplify.cpp +++ b/src/livarot/PathSimplify.cpp @@ -1209,7 +1209,7 @@ void Path::Coalesce(double tresh) if (lastAddition->flags != descr_moveto) { FlushPendingAddition(tempDest,lastAddition.get(),pending_cubic,lastAP); } - lastAddition.reset(descr_cmd[curP]); + lastAddition.reset(descr_cmd[curP]->clone()); lastAP = curP; FlushPendingAddition(tempDest, lastAddition.get(), pending_cubic, lastAP); // Added automatically (too bad about multiple moveto's). @@ -1291,7 +1291,7 @@ void Path::Coalesce(double tresh) lastA = descr_cmd[lastP]->associated; // pourrait etre surecrit par la ligne suivante /* (possible translation: Could be overwritten by the next line.) */ FlushPendingAddition(tempDest, lastAddition.get(), pending_cubic, lastAP); - lastAddition.reset(descr_cmd[curP]); + lastAddition.reset(descr_cmd[curP]->clone()); if ( typ == descr_cubicto ) { pending_cubic = *(dynamic_cast<PathDescrCubicTo*>(descr_cmd[curP])); } @@ -1301,7 +1301,7 @@ void Path::Coalesce(double tresh) } else { lastA = prevA /*descr_cmd[curP-1]->associated */ ; - lastAddition.reset(descr_cmd[curP]); + lastAddition.reset(descr_cmd[curP]->clone()); if ( typ == descr_cubicto ) { pending_cubic = *(dynamic_cast<PathDescrCubicTo*>(descr_cmd[curP])); } |
