--- res/res_speech.c.orig 2007-11-21 18:09:02.000000000 -0500 +++ res/res_speech.c 2010-02-22 16:50:14.000000000 -0500 @@ -313,7 +313,7 @@ /* We have our engine... removed it */ AST_RWLIST_REMOVE_CURRENT(list); /* If this was the default engine, we need to pick a new one */ - if (!default_engine) + if (engine == default_engine) default_engine = AST_RWLIST_FIRST(&engines); ast_verb(2, "Unregistered speech recognition engine '%s'\n", engine_name); /* All went well */