summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-02-27 21:50:53 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-02-27 21:50:53 +0000
commit83e693c338fb585bed735d8302a700ba7ad39442 (patch)
tree5f2e2996b63ad76750878faaa909b1a96b2cd0d7 /src
parentremove superfluous line of code (vector has just been constructed, so is empty) (diff)
downloadinkscape-83e693c338fb585bed735d8302a700ba7ad39442.tar.gz
inkscape-83e693c338fb585bed735d8302a700ba7ad39442.zip
swatches dialog: properly reference count the reference to SPDocument in timer object. Fixes crash reported in comment #6 of bug 1284391!
Fixed bugs: - https://launchpad.net/bugs/1284391 (bzr r13068)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/swatches.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index 3f161ad28..06b52e2e2 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -746,7 +746,7 @@ class DocTrack
{
public:
DocTrack(SPDocument *doc, sigc::connection &gradientRsrcChanged, sigc::connection &defsChanged, sigc::connection &defsModified) :
- doc(doc),
+ doc(doc->doRef()),
updatePending(false),
lastGradientUpdate(0.0),
gradientRsrcChanged(gradientRsrcChanged),
@@ -776,6 +776,7 @@ public:
gradientRsrcChanged.disconnect();
defsChanged.disconnect();
defsModified.disconnect();
+ doc->doUnref();
}
}