[uim-commit] r890 - trunk/xim

ekato at freedesktop.org ekato at freedesktop.org
Sat Jun 18 06:54:42 PDT 2005


Author: ekato
Date: 2005-06-18 06:54:35 -0700 (Sat, 18 Jun 2005)
New Revision: 890

Modified:
   trunk/xim/ximserver.cpp
Log:
* xim/ximserver.cpp (InputContext::createUimContext) : Fix
  unwanted free() of a string while invoking reload_uim().


Modified: trunk/xim/ximserver.cpp
===================================================================
--- trunk/xim/ximserver.cpp	2005-06-18 13:19:02 UTC (rev 889)
+++ trunk/xim/ximserver.cpp	2005-06-18 13:54:35 UTC (rev 890)
@@ -362,8 +362,10 @@
     free(mLocaleName);
     mLocaleName = locale;
 
-    free(mEngineName);
-    mEngineName = strdup(real_im);
+    if (mEngineName != real_im) {
+      free(mEngineName);
+      mEngineName = strdup(real_im);
+    }
 
     uim_context uc = uim_create_context((void *) this, "UTF-8",
 					NULL, real_im, uim_iconv,



More information about the uim-commit mailing list