summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f170a3)
raw | patch | inline | side by side (parent: 2f170a3)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 3 Mar 2009 20:08:37 +0000 (20:08 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 3 Mar 2009 20:08:37 +0000 (20:08 +0000) |
src/filters/image.cpp | patch | blob | history |
diff --git a/src/filters/image.cpp b/src/filters/image.cpp
index f4764577a9f6ee9a066177bc24f33b0610e4cecb..32afe5db66fecf106d3f4797d4fd67bd5e1e384b 100644 (file)
--- a/src/filters/image.cpp
+++ b/src/filters/image.cpp
{
SPFeImage *feImage = SP_FEIMAGE(object);
(void)feImage;
- Inkscape::URI* SVGElem_uri;
+ Inkscape::URI *SVGElem_uri = NULL;
switch(key) {
- /*DEAL WITH SETTING ATTRIBUTES HERE*/
- case SP_ATTR_XLINK_HREF:
- if (feImage->href) g_free(feImage->href);
- feImage->href = (value) ? g_strdup (value) : NULL;
+ /*DEAL WITH SETTING ATTRIBUTES HERE*/
+ case SP_ATTR_XLINK_HREF:
+ if (feImage->href) {
+ g_free(feImage->href);
+ }
+ feImage->href = (value) ? g_strdup (value) : NULL;
if (!feImage->href) return;
try{
SVGElem_uri = new Inkscape::URI(feImage->href);
feImage->from_element = true;
feImage->SVGElemRef->attach(*SVGElem_uri);
feImage->SVGElem = SP_ITEM(feImage->SVGElemRef->getObject());
-
- g_free(SVGElem_uri);
+
+ delete SVGElem_uri;
feImage->_modified_connection = ((SPObject*) feImage->SVGElem)->connectModified(sigc::bind(sigc::ptr_fun(&sp_feImage_elem_modified), object));
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;