aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-08 23:27:44 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-08 23:27:44 +0800
commit0fbad748e467255cdc67bc9029366e1cee13d4a4 (patch)
tree14204cc328e35b82090d247edce2355211d75a68 /embed
parent3c1e4ad57e58f84e702bb2cf8de2ff04f3416d84 (diff)
downloadgsoc2013-epiphany-0fbad748e467255cdc67bc9029366e1cee13d4a4.tar
gsoc2013-epiphany-0fbad748e467255cdc67bc9029366e1cee13d4a4.tar.gz
gsoc2013-epiphany-0fbad748e467255cdc67bc9029366e1cee13d4a4.tar.bz2
gsoc2013-epiphany-0fbad748e467255cdc67bc9029366e1cee13d4a4.tar.lz
gsoc2013-epiphany-0fbad748e467255cdc67bc9029366e1cee13d4a4.tar.xz
gsoc2013-epiphany-0fbad748e467255cdc67bc9029366e1cee13d4a4.tar.zst
gsoc2013-epiphany-0fbad748e467255cdc67bc9029366e1cee13d4a4.zip
Don't use g_return_if_fail for run-time error conditions.
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.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-shell.c12
1 files changed, 10 insertions, 2 deletions
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)