From 0fbad748e467255cdc67bc9029366e1cee13d4a4 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 8 Dec 2003 15:27:44 +0000 Subject: Don't use g_return_if_fail for run-time error conditions. 2003-12-08 Christian Persch * embed/ephy-embed-shell.c: (load_mime_from_xml): Don't use g_return_if_fail for run-time error conditions. --- embed/ephy-embed-shell.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'embed/ephy-embed-shell.c') diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index 00867ed8b..364eab5e6 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -220,10 +220,18 @@ load_mime_from_xml (EphyEmbedShell *shell) EphyMimePermission permission = EPHY_MIME_PERMISSION_UNKNOWN; xml_file = ephy_file ("mime-types-permissions.xml"); - g_return_if_fail (xml_file != NULL); + if (xml_file == NULL) + { + g_warning ("MIME types permissions file not found!\n"); + return; + } reader = xmlNewTextReaderFilename (xml_file); - g_return_if_fail (reader != NULL); + if (reader == NULL) + { + g_warning ("Could not load MIME types permissions file!\n"); + return; + } ret = xmlTextReaderRead (reader); while (ret == 1) -- cgit v1.2.3