diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-07-28 01:57:53 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-07-28 01:57:53 +0000 |
| commit | b866548d43ef89eefbbec860e0935f8f2505277f (patch) | |
| tree | da03e6a0cdc3db53f5836d9c723ed4e3617ce9fa /src/document.cpp | |
| parent | Duplicate the undo key passed to sp_document_maybe_done, instead of simply (diff) | |
| download | inkscape-b866548d43ef89eefbbec860e0935f8f2505277f.tar.gz inkscape-b866548d43ef89eefbbec860e0935f8f2505277f.zip | |
Safer fix for bug #579932 that won't leak memory.
(bzr r9662)
Diffstat (limited to 'src/document.cpp')
| -rw-r--r-- | src/document.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/document.cpp b/src/document.cpp index eebc50a98..3c9f7e5ed 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -92,7 +92,7 @@ SPDocument::SPDocument() : base(0), name(0), priv(0), // reset in ctor - actionkey(0), + actionkey(), modified_id(0), rerouting_handler_id(0), profileManager(0), // deferred until after other initialization @@ -211,10 +211,6 @@ SPDocument::~SPDocument() { inkscape_unref(); keepalive = FALSE; } - if (actionkey) { - g_free(actionkey); - actionkey = NULL; - } //delete this->_whiteboard_session_manager; } @@ -291,7 +287,7 @@ void SPDocument::collectOrphans() { void SPDocument::reset_key (void */*dummy*/) { - actionkey = NULL; + actionkey.clear(); } SPDocument * |
