summaryrefslogtreecommitdiffstats
path: root/src/splivarot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/splivarot.cpp')
-rw-r--r--src/splivarot.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 58adee3a2..a23d6da02 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1723,6 +1723,17 @@ Path_for_item(SPItem *item, bool doTransformation, bool transformFull)
bpath=SP_CURVE_BPATH(curve);
}
+ Path *dest = bpath_to_Path(bpath);
+
+ if ( doTransformation ) {
+ if ( bpath ) g_free(bpath);
+ } else {
+ sp_curve_unref(curve);
+ }
+ return dest;
+}
+
+Path *bpath_to_Path(NArtBpath const *bpath) {
Path *dest = new Path;
dest->SetBackData(false);
{
@@ -1776,12 +1787,6 @@ Path_for_item(SPItem *item, bool doTransformation, bool transformFull)
if (closed)
dest->Close();
}
-
- if ( doTransformation ) {
- if ( bpath ) g_free(bpath);
- } else {
- sp_curve_unref(curve);
- }
return dest;
}