From f6cac4f8845baef7ea1c3f6081ce27589ab48376 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 24 May 2016 14:51:17 +0900 Subject: [PATCH] Fix bug not to register 3rd party IME The appid of 3rd party IME will be defined in run (). Change-Id: I600c12393426e381cb3cf2a802aa1045c5fb1530 --- src/sclcoreimpl.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) mode change 100755 => 100644 src/sclcoreimpl.cpp diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp old mode 100755 new mode 100644 index d4ecaa8..5735208 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -272,17 +272,23 @@ void CSCLCoreImpl::on_run(const sclchar *uuid, const sclchar *display) m_core_ui.init(); m_connection.init(); - if (m_uuid) { - free(m_uuid); - } + LOGD ("uuid : '%s', display : '%s'\n", uuid, display); - m_uuid = strdup(uuid); + if (uuid && strlen(uuid) > 0) { + if (m_uuid) { + free(m_uuid); + } - if (m_display) { - free(m_display); + m_uuid = strdup(uuid); } - m_display = strdup(display); + if (display) { + if (m_display) { + free(m_display); + } + + m_display = strdup(display); + } if (m_event_callback) { m_event_callback->on_run(0, NULL); @@ -356,4 +362,4 @@ void CSCLCoreImpl::send_private_command(const sclchar *command) void CSCLCoreImpl::get_selection_text(sclchar **text) { m_connection.get_selection_text(text); -} \ No newline at end of file +} -- 2.7.4