diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_manager.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_manager.cpp index 84e68dcd1..2154db628 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/phrase_manager.cpp @@ -456,7 +456,14 @@ void CPhraseManager::updatePhrases() } // update this phrase - updateEntityCurrentAction( (*it).first, entityPhrases); + CSPhrase::TPhraseState old_state; + do + { + old_state = phrase->state(); + updateEntityCurrentAction( (*it).first, entityPhrases); + phrase = entityPhrases.getCurrentAction(); + //Every time we get the next action, th phrase might be deleted (if the action is invalid or finished for non-cyclic actions like digging / crafting), always check ! + } while(phrase != NULL && old_state != phrase->state()); // get next entity sentences ++it;