From 028e8cdd97f6d9c7b49539139703b5512630f7e6 Mon Sep 17 00:00:00 2001 From: BennyR Date: Wed, 7 May 2014 17:03:13 +0200 Subject: [PATCH] Node dies if a voice can't be loaded --- cerevoice_tts/src/cerevoice_tts_node.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cerevoice_tts/src/cerevoice_tts_node.cpp b/cerevoice_tts/src/cerevoice_tts_node.cpp index f34e61d..49698af 100644 --- a/cerevoice_tts/src/cerevoice_tts_node.cpp +++ b/cerevoice_tts/src/cerevoice_tts_node.cpp @@ -43,7 +43,10 @@ int main(int argc, char **argv) ros::init(argc, argv, "tts_node"); cerevoice_tts::CerevoiceTts tts; - tts.init(); + bool initialized = tts.init(); + + if(!initialized) + return EXIT_FAILURE; ros::spin();