From 9de588d8314f36ed26d4d123da4e8fb92f85a277 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 19 May 2008 19:04:45 +0000 Subject: SPDrawAnchor should add a refcount to SPCurve! (bzr r5712) --- src/draw-anchor.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/draw-anchor.cpp') diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp index b06e94a48..32ee8ca78 100644 --- a/src/draw-anchor.cpp +++ b/src/draw-anchor.cpp @@ -18,6 +18,7 @@ #include "desktop-handles.h" #include "event-context.h" #include "display/sodipodi-ctrl.h" +#include "display/curve.h" /** * Creates an anchor object and initializes it. @@ -31,6 +32,7 @@ sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, NR::Point a->dc = dc; a->curve = curve; + curve->ref(); a->start = start; a->active = FALSE; a->dp = delta; @@ -53,6 +55,9 @@ sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, NR::Point SPDrawAnchor * sp_draw_anchor_destroy(SPDrawAnchor *anchor) { + if (anchor->curve) { + anchor->curve->unref(); + } if (anchor->ctrl) { gtk_object_destroy(GTK_OBJECT(anchor->ctrl)); } -- cgit v1.2.3