From 770323e52cf4ea10058aa4f7a13a8723941481c4 Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Wed, 26 May 2010 21:49:32 +0200 Subject: [PATCH] temporary fix, to stop lpe clone freeze --- src/sp-lpe-item.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index cc718f85e..fb5eb8799 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -810,6 +810,7 @@ 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. // Forking messes up the path effect list, so after each fork, // reload the list and recheck if more forking is required. + int maxloops = 20; do { forked = false; PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem); @@ -825,7 +826,7 @@ bool sp_lpe_item_fork_path_effects_if_necessary(SPLPEItem *lpeitem, unsigned int } } } - } while (forked); + } while (forked && (maxloops-- > 1)); } return forked; -- 2.30.2