changeset 20805:e0ce7124d2d4

Fix CID 353
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 10 Oct 2007 01:01:21 +0000
parents 9e51721a23c7
children 2a6ef74f5a4e
files pidgin/gtkutils.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkutils.c	Wed Oct 10 00:47:28 2007 +0000
+++ b/pidgin/gtkutils.c	Wed Oct 10 01:01:21 2007 +0000
@@ -111,19 +111,20 @@
 		desc = pango_font_description_from_string(font);
 	} else if (purple_running_gnome()) {
 		/* Use the GNOME "document" font, if applicable */
-		char *path, *font;
+		char *path;
 
 		if ((path = g_find_program_in_path("gconftool-2"))) {
+			char *font = NULL;
 			g_free(path);
-			if (!g_spawn_command_line_sync(
+			if (g_spawn_command_line_sync(
 					"gconftool-2 -g /desktop/gnome/interface/document_font_name",
-					&font, NULL, NULL, NULL))
-				return;
+					&font, NULL, NULL, NULL)) {
+				desc = pango_font_description_from_string(font);
+			}
+			g_free(font);
 		}
-		desc = pango_font_description_from_string(font);
-		g_free(font);
 	}
-	
+
 	if (desc) {
 		gtk_widget_modify_font(imhtml, desc);
 		pango_font_description_free(desc);