diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2011-11-05 07:20:36 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2011-11-05 07:20:36 +0000 |
| commit | 7b1b14913ac759e86176d212afa6d90f67eb8bb6 (patch) | |
| tree | 6c76923a97854c7ae6c24ee4e352e4b413d9a909 /src/dom | |
| parent | 1) Cycle to the next-closest-snap-source when pressing tab, if the snap-close... (diff) | |
| download | inkscape-7b1b14913ac759e86176d212afa6d90f67eb8bb6.tar.gz inkscape-7b1b14913ac759e86176d212afa6d90f67eb8bb6.zip | |
Various fixes: initialization, memory leak, wrong iterator usage
(bzr r10721)
Diffstat (limited to 'src/dom')
| -rw-r--r-- | src/dom/views.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/dom/views.h b/src/dom/views.h index 48afd5d16..f165d2a9b 100644 --- a/src/dom/views.h +++ b/src/dom/views.h @@ -125,12 +125,14 @@ public: private: void assign(const AbstractView &other) + { + if (documentView != NULL) { + free(documentView); //NOTE: is free the correct method? + } documentView = other.documentView; - } - - DocumentView *documentView; - + } + DocumentView *documentView; }; @@ -163,7 +165,7 @@ public: /** * */ - DocumentView() {} + DocumentView() {defaultView = NULL;} /** * @@ -190,10 +192,13 @@ public: private: void assign(const DocumentView &other) + { + if (defaultView != NULL) { + free(defaultView); //NOTE: is free the correct method? + } defaultView = other.defaultView; - } - + } AbstractView *defaultView; }; |
