[uim-commit] r1270 - branches/0.4/xim

ekato at freedesktop.org ekato at freedesktop.org
Mon Aug 22 01:36:00 EST 2005


Author: ekato
Date: 2005-08-21 08:35:58 -0700 (Sun, 21 Aug 2005)
New Revision: 1270

Modified:
   branches/0.4/xim/convdisp.cpp
Log:
* xim/convdisp.cpp (update_default_xftfont) : Port r1269 from trunk.


Modified: branches/0.4/xim/convdisp.cpp
===================================================================
--- branches/0.4/xim/convdisp.cpp	2005-08-21 15:33:57 UTC (rev 1269)
+++ branches/0.4/xim/convdisp.cpp	2005-08-21 15:35:58 UTC (rev 1270)
@@ -99,7 +99,7 @@
 
 void
 update_default_xftfont() {
-    const char *fontname;
+    char *fontname;
     
     if (!uim_scm_symbol_value_bool("uim-xim-use-xft-font?"))
       return;
@@ -118,8 +118,10 @@
 	    free(gXftFontName);
 	    free(gXftFontLocale);
 	    gXftFont = xftfont;
-	    gXftFontName = strdup(fontname);
+	    gXftFontName = fontname;
 	    gXftFontLocale = strdup(setlocale(LC_CTYPE, NULL));
+	} else {
+	    free(fontname);
 	}
     }
 }



More information about the uim-commit mailing list