It works! Thanks.
But i have a better solution for those who have their own function to get the menu.
if(!getMainMenu()){
$backup=$wp_query;
$wp_query = NULL;
$wp_query = new WP_Query(array(‘post_type’ => ‘post’));
getMainMenu();
$wp_query=$backup;}
notes:My getMainMenu function returns false when it fails to retrieve menu.
With this way, i don’t need to adapt the solution in every theme files that requires it.
Hope it helps.