main: Handle exception calling elm_shutdown without elm_exit 51/125051/1 accepted/tizen/3.0/common/20170414.095000 accepted/tizen/3.0/ivi/20170414.043232 accepted/tizen/3.0/mobile/20170414.043125 accepted/tizen/3.0/tv/20170414.043157 accepted/tizen/3.0/wearable/20170414.043216 submit/tizen_3.0/20170413.122705
authorShinwoo Kim <cinoo.kim@samsung.com>
Thu, 13 Apr 2017 11:50:51 +0000 (20:50 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 13 Apr 2017 12:18:07 +0000 (21:18 +0900)
elm_shutdown could be called without elm_exit.
In this case, the dbus connection created in elm_run is not disconnected.
Then eldbus complains with CRItical log message.

Change-Id: I20fdd1730a764301d297470de7cfa32173f8504c

src/lib/elm_main.c

index 62ad579f29f08cc5ba08e72c1b9d6e67b994517d..94c86584d8663b1a116552a22fdc14b1fc6ef6b6 100644 (file)
@@ -351,6 +351,11 @@ elm_shutdown(void)
    _elm_init_count--;
    if (_elm_init_count > 0) return _elm_init_count;
 
+   //TIZEN_ONLY(20170413) Handle exception calling elm_shutdown without elm_exit
+   if (_elm_config->atspi_mode != ELM_ATSPI_MODE_OFF)
+     _elm_atspi_bridge_shutdown();
+   //
+
    ecore_event_handler_del(system_handlers[0]);
    ecore_event_handler_del(system_handlers[1]);
 
@@ -1126,7 +1131,9 @@ elm_run(void)
 EAPI void
 elm_exit(void)
 {
-   _elm_atspi_bridge_shutdown();
+   if (_elm_config->atspi_mode != ELM_ATSPI_MODE_OFF)
+     _elm_atspi_bridge_shutdown();
+
    ecore_main_loop_quit();
 
    if (elm_policy_get(ELM_POLICY_EXIT) == ELM_POLICY_EXIT_WINDOWS_DEL)