summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b890f0c)
raw | patch | inline | side by side (parent: b890f0c)
author | gustav_b <gustav_b@users.sourceforge.net> | |
Wed, 11 Apr 2007 21:02:46 +0000 (21:02 +0000) | ||
committer | gustav_b <gustav_b@users.sourceforge.net> | |
Wed, 11 Apr 2007 21:02:46 +0000 (21:02 +0000) |
leaking the old) when coalescing Inkscape::XML::Events in sp_document_maybe_done.
src/document-undo.cpp | patch | blob | history |
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index f37b53f89c5d89c228d78dd5b9eb67c61aa3aeff..9ce1dad603fa8f59af769b9aef213d579b989939 100644 (file)
--- 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);