aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--embed/ephy-embed-shell.c12
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fb175e2b1..56442e83e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2003-12-08 Christian Persch <chpe@cvs.gnome.org>
+ * embed/ephy-embed-shell.c: (load_mime_from_xml):
+
+ Don't use g_return_if_fail for run-time error conditions.
+
+2003-12-08 Christian Persch <chpe@cvs.gnome.org>
+
* src/ephy-tab.c: (save_property_url),
(ephy_tab_dom_mouse_click_cb):
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)