[evolution] Bug #629479 - Runtime critical warnings from e-print.c



commit 2d9910210e1424bfe3d2863b9564ff8d34ecf92f
Author: Milan Crha <mcrha redhat com>
Date:   Tue Nov 2 10:16:11 2010 +0100

    Bug #629479 - Runtime critical warnings from e-print.c

 e-util/e-print.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/e-util/e-print.c b/e-util/e-print.c
index 756381f..dd5a56a 100644
--- a/e-util/e-print.c
+++ b/e-util/e-print.c
@@ -94,8 +94,9 @@ load_settings (GKeyFile *key_file)
 
 	settings = gtk_print_settings_new ();
 
-	gtk_print_settings_load_key_file (
-		settings, key_file, PRINT_SETTINGS_GROUP_NAME, &error);
+	if (g_key_file_has_group (key_file, PRINT_SETTINGS_GROUP_NAME))
+		gtk_print_settings_load_key_file (
+			settings, key_file, PRINT_SETTINGS_GROUP_NAME, &error);
 
 	if (error != NULL) {
 		g_warning ("%s", error->message);
@@ -127,17 +128,12 @@ static GtkPageSetup *
 load_page_setup (GKeyFile *key_file)
 {
 	GtkPageSetup *page_setup;
-	GError *error = NULL;
 
 	page_setup = gtk_page_setup_new ();
 
-	gtk_page_setup_load_key_file (
-		page_setup, key_file, PAGE_SETUP_GROUP_NAME, &error);
-
-	if (error != NULL) {
-		g_warning ("%s", error->message);
-		g_error_free (error);
-	}
+	if (g_key_file_has_group (key_file, PAGE_SETUP_GROUP_NAME))
+		gtk_page_setup_load_key_file (
+			page_setup, key_file, PAGE_SETUP_GROUP_NAME, NULL);
 
 	return page_setup;
 }



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