summaryrefslogtreecommitdiffstats
path: root/src/path-chemistry.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-03-25 18:26:56 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-03-25 18:26:56 +0000
commit7f2cbea1d2c460849d1c854f4b6a1f41bf9d07b2 (patch)
treea02058015a83e19f810ff24fce742f88258ba22d /src/path-chemistry.cpp
parentUpdating libdepixelize. (diff)
downloadinkscape-7f2cbea1d2c460849d1c854f4b6a1f41bf9d07b2.tar.gz
inkscape-7f2cbea1d2c460849d1c854f4b6a1f41bf9d07b2.zip
fix crash introduced in rev. 13199. (revert the change to Glib::string (crashes on nullptr init), but keep the memleak fix)
Fixed bugs: - https://launchpad.net/bugs/1297174 (bzr r13210)
Diffstat (limited to 'src/path-chemistry.cpp')
-rw-r--r--src/path-chemistry.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 22928ccdd..d355b49fe 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -83,8 +83,8 @@ sp_selected_path_combine(SPDesktop *desktop)
gint position = 0;
char const *id = NULL;
char const *transform = NULL;
- Glib::ustring style;
- Glib::ustring path_effect;
+ char const *style = NULL;
+ char const *path_effect = NULL;
SPCurve* curve = NULL;
SPItem *first = NULL;
@@ -153,7 +153,7 @@ sp_selected_path_combine(SPDesktop *desktop)
// set path data corresponding to new curve
gchar *dstring = sp_svg_write_path(curve->get_pathvector());
curve->unref();
- if (!path_effect.empty()) {
+ if (path_effect) {
repr->setAttribute("inkscape:original-d", dstring);
} else {
repr->setAttribute("d", dstring);
@@ -365,7 +365,7 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec
items = items->next) {
SPItem *item = SP_ITEM(items->data);
- SPDocument *document = item->document;
+ SPDocument *document = item->document;
if ( skip_all_lpeitems &&
SP_IS_LPE_ITEM(item) &&
@@ -443,12 +443,12 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec
parent->appendChild(repr);
SPObject* newObj = document->getObjectByRepr(repr);
if (title && newObj) {
- newObj->setTitle(title);
- g_free(title);
+ newObj->setTitle(title);
+ g_free(title);
}
if (desc && newObj) {
- newObj->setDesc(desc);
- g_free(desc);
+ newObj->setDesc(desc);
+ g_free(desc);
}
// move to the saved position