From dd7424d729859eff2c91210ead1f2bf6f8961097 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 2 Nov 2010 10:16:11 +0100 Subject: Bug #629479 - Runtime critical warnings from e-print.c --- e-util/e-print.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'e-util') diff --git a/e-util/e-print.c b/e-util/e-print.c index 756381f805..dd5a56aa16 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; } -- cgit