gedit r6133 - in trunk: . gedit



Author: pborelli
Date: Sun Jan 27 15:02:26 2008
New Revision: 6133
URL: http://svn.gnome.org/viewvc/gedit?rev=6133&view=rev

Log:
2008-01-27  Paolo Borelli  <pborelli katamail com>

	* gedit/gedit-view.c: fix tiny leak.



Modified:
   trunk/ChangeLog
   trunk/gedit/gedit-view.c

Modified: trunk/gedit/gedit-view.c
==============================================================================
--- trunk/gedit/gedit-view.c	(original)
+++ trunk/gedit/gedit-view.c	Sun Jan 27 15:02:26 2008
@@ -590,11 +590,20 @@
 	g_return_if_fail (GEDIT_IS_VIEW (view));
 
 	if (def)
-		font_name = gedit_prefs_manager_get_system_font ();
+	{
+		gchar *font;
+
+		font = gedit_prefs_manager_get_system_font ();
+		font_desc = pango_font_description_from_string (font);
+		g_free (font);
+	}
+	else
+	{
+		g_return_if_fail (font_name != NULL);
 
-	g_return_if_fail (font_name != NULL);
+		font_desc = pango_font_description_from_string (font_name);
+	}
 
-	font_desc = pango_font_description_from_string (font_name);
 	g_return_if_fail (font_desc != NULL);
 
 	gtk_widget_modify_font (GTK_WIDGET (view), font_desc);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]