summaryrefslogtreecommitdiffstats
path: root/src/document-undo.cpp
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2007-04-11 21:02:46 +0000
committergustav_b <gustav_b@users.sourceforge.net>2007-04-11 21:02:46 +0000
commitdb18d8ccdbfd4f819ed37e106084d61437f34076 (patch)
treeb2b6667992c7ab380a17ce034190d0c2762e2e02 /src/document-undo.cpp
parentAdding icons to pop-up toolbar menus (diff)
downloadinkscape-db18d8ccdbfd4f819ed37e106084d61437f34076.tar.gz
inkscape-db18d8ccdbfd4f819ed37e106084d61437f34076.zip
Use the existing Inkscape::Event instead of creating a new one (and
leaking the old) when coalescing Inkscape::XML::Events in sp_document_maybe_done. (bzr r2862)
Diffstat (limited to 'src/document-undo.cpp')
-rw-r--r--src/document-undo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index f37b53f89..9ce1dad60 100644
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
@@ -152,9 +152,8 @@ sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int ev
}
if (key && doc->actionkey && !strcmp (key, doc->actionkey) && doc->priv->undo) {
- doc->priv->undo->data =
- new Inkscape::Event(sp_repr_coalesce_log (((Inkscape::Event *)
- doc->priv->undo->data)->event, log));
+ ((Inkscape::Event *)doc->priv->undo->data)->event =
+ sp_repr_coalesce_log (((Inkscape::Event *)doc->priv->undo->data)->event, log);
} else {
Inkscape::Event *event = new Inkscape::Event(log, event_type, event_description);
doc->priv->undo = g_slist_prepend (doc->priv->undo, event);