summaryrefslogtreecommitdiffstats
path: root/src/sp-guide.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-03-28 21:16:35 +0000
committerMartin Owens <doctormo@gmail.com>2014-03-28 21:16:35 +0000
commitb8a04c5946f23e3cc09e398d1b6603bbba6ceed9 (patch)
treead79dc7432dda707322d605722790975ad23b4b2 /src/sp-guide.cpp
parentRemove _onApply and strdup the char from the label before it gets corrupted. ... (diff)
downloadinkscape-b8a04c5946f23e3cc09e398d1b6603bbba6ceed9.tar.gz
inkscape-b8a04c5946f23e3cc09e398d1b6603bbba6ceed9.zip
Guides: Clean up memory a bit better and move color changed to OK so we don't set the colour before OK
(bzr r13228)
Diffstat (limited to 'src/sp-guide.cpp')
-rw-r--r--src/sp-guide.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp
index a0aa9692e..60f15a79d 100644
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
@@ -183,6 +183,8 @@ void SPGuide::release() {
void SPGuide::set(unsigned int key, const gchar *value) {
switch (key) {
case SP_ATTR_INKSCAPE_LABEL:
+ if (this->label) g_free(this->label);
+
if (value) {
this->label = g_strdup(value);
} else {