diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-09-20 23:37:34 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-09-20 23:37:34 +0000 |
| commit | fab52ebd9467ef63f3a0c5ed9c4ab3f379c88b79 (patch) | |
| tree | 6b09bf6c1cdf41d0b7d928a038605f487ee43a62 /src/widgets/gradient-vector.cpp | |
| parent | fix leak and potential crash by disconnecting on delete (diff) | |
| download | inkscape-fab52ebd9467ef63f3a0c5ed9c4ab3f379c88b79.tar.gz inkscape-fab52ebd9467ef63f3a0c5ed9c4ab3f379c88b79.zip | |
release reprs properly
(bzr r6855)
Diffstat (limited to 'src/widgets/gradient-vector.cpp')
| -rw-r--r-- | src/widgets/gradient-vector.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 991e415d5..881f34628 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -480,17 +480,20 @@ verify_grad(SPGradient *gradient) sp_repr_set_css_double(child, "offset", 0.0); child->setAttribute("style", os.str().c_str()); SP_OBJECT_REPR (gradient)->addChild(child, NULL); + Inkscape::GC::release(child); child = xml_doc->createElement("svg:stop"); sp_repr_set_css_double(child, "offset", 1.0); child->setAttribute("style", os.str().c_str()); SP_OBJECT_REPR (gradient)->addChild(child, NULL); + Inkscape::GC::release(child); } if (i < 2) { sp_repr_set_css_double(SP_OBJECT_REPR(stop), "offset", 0.0); Inkscape::XML::Node *child = SP_OBJECT_REPR(stop)->duplicate(SP_OBJECT_REPR(gradient)->document()); sp_repr_set_css_double(child, "offset", 1.0); SP_OBJECT_REPR(gradient)->addChild(child, SP_OBJECT_REPR (stop)); + Inkscape::GC::release(child); } } |
