Fix bug not to register 3rd party IME 98/71098/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 24 May 2016 05:51:17 +0000 (14:51 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 24 May 2016 05:52:54 +0000 (14:52 +0900)
The appid of 3rd party IME will be defined in run ().

Change-Id: I600c12393426e381cb3cf2a802aa1045c5fb1530

src/sclcoreimpl.cpp [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index d4ecaa8..5735208
@@ -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
+}