From f8d1a5e008c9f5f2c3e251f8168b68fcbfe968b5 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 8 Aug 2008 17:40:35 +0000 Subject: [PATCH] fix crash --- pandatool/src/eggcharbase/eggCharacterCollection.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pandatool/src/eggcharbase/eggCharacterCollection.cxx b/pandatool/src/eggcharbase/eggCharacterCollection.cxx index 1eeddd31b0..eb13e7f1be 100644 --- a/pandatool/src/eggcharbase/eggCharacterCollection.cxx +++ b/pandatool/src/eggcharbase/eggCharacterCollection.cxx @@ -542,20 +542,18 @@ match_egg_nodes(EggCharacterData *char_data, EggJointData *joint_data, // First, check to see if any of the names match any past-used // name. - EggNodeList more_egg_nodes; for (ei = extra_egg_nodes.begin(); ei != extra_egg_nodes.end(); ++ei) { EggNode *egg_node = (*ei); bool matched = false; - for (di = extra_data.begin(); - di != extra_data.end() && !matched; - ++di) { + for (di = extra_data.begin(); di != extra_data.end(); ++di) { EggJointData *data = (*di); if (data->matches_name(egg_node->get_name())) { - matched = true; found_egg_match(char_data, data, egg_node, egg_index, model_index); extra_data.erase(di); + matched = true; + break; } }