From f736b49d4e0e424bf8fd2ef1786bec4539a066eb Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Wed, 26 Oct 2011 11:15:36 -0400 Subject: Exit if config component is not ready instead of crash. BUG=crash when ibus config is not ready TEST=Linux desktop Review URL: http://codereview.appspot.com/5321054 --- src/PYMain.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/PYMain.cc b/src/PYMain.cc index 021201f..f786b70 100644 --- a/src/PYMain.cc +++ b/src/PYMain.cc @@ -76,7 +76,12 @@ start_component (void) Bus bus; if (!bus.isConnected ()) { - g_warning ("Can not connect to ibus"); + g_warning ("Can not connect to ibus!"); + exit (0); + } + + if (!ibus_bus_get_config (bus)) { + g_warning ("IBus config component is not ready!"); exit (0); } -- cgit