summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4004987)
raw | patch | inline | side by side (parent: 4004987)
author | Johan Engelen <goejendaagh@zonnet.nl> | |
Tue, 1 Jun 2010 21:17:09 +0000 (23:17 +0200) | ||
committer | Johan Engelen <goejendaagh@zonnet.nl> | |
Tue, 1 Jun 2010 21:17:09 +0000 (23:17 +0200) |
src/sp-lpe-item.cpp | patch | blob | history |
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 77b2db6f69a6fc83c66a6b55428ba099dfac5e19..71352ed98992c2c6105c989f274e862c1c3de3ce 100644 (file)
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -814,6 +814,10 @@ bool sp_lpe_item_fork_path_effects_if_necessary(SPLPEItem *lpeitem, unsigned int
// so that each object has its own independent copy of the effect.
// Note: replacing path effects messes up the path effect list
+ // Clones of the LPEItem will increase the refcount of the lpeobjects.
+ // Therefore, nr_of_allowed_users should be increased with the number of clones (i.e. refs to the lpeitem)
+ nr_of_allowed_users += SP_OBJECT(lpeitem)->hrefcount;
+
std::vector<LivePathEffectObject const *> old_lpeobjs, new_lpeobjs;
PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem);
for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); it++)