aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-07-04 07:16:28 +0800
committerChristian Persch <chpe@src.gnome.org>2004-07-04 07:16:28 +0800
commit19c653c5affa0717a1fe627833b667bd0fb226a6 (patch)
treee77a5b66d82e8585b755b09bd7da3b0829b704e5 /embed
parent9ca863b51695d5f237e5083948b88cb140b1358e (diff)
downloadgsoc2013-epiphany-19c653c5affa0717a1fe627833b667bd0fb226a6.tar.gz
gsoc2013-epiphany-19c653c5affa0717a1fe627833b667bd0fb226a6.tar.zst
gsoc2013-epiphany-19c653c5affa0717a1fe627833b667bd0fb226a6.zip
Use regular return for valid error conditions, not g_return_if_fail.
2004-07-04 Christian Persch <chpe@cvs.gnome.org> * embed/downloader-view.c: (downloader_view_add_download): Use regular return for valid error conditions, not g_return_if_fail.
Diffstat (limited to 'embed')
-rw-r--r--embed/downloader-view.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 7980f6429..e9db4edb2 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -478,7 +478,8 @@ downloader_view_add_download (DownloaderView *dv,
G_CALLBACK (download_changed_cb), dv, 0);
mime = ephy_download_get_mime (download);
- g_return_if_fail (mime != NULL);
+ if (mime == NULL) return;
+
theme = gtk_icon_theme_get_default ();
icon_name = gnome_icon_lookup (theme, NULL, NULL, NULL, NULL,
mime, GNOME_ICON_LOOKUP_FLAGS_NONE, NULL);
@@ -491,7 +492,7 @@ downloader_view_add_download (DownloaderView *dv,
icon_info = gtk_icon_theme_lookup_icon (theme, icon_name, 0, 0);
g_free (icon_name);
- g_return_if_fail (icon_info != NULL);
+ if (icon_info == NULL) return;
icon_name = g_strdup (gtk_icon_info_get_filename (icon_info));
gtk_icon_info_free (icon_info);
@@ -499,7 +500,8 @@ downloader_view_add_download (DownloaderView *dv,
pixbuf = gdk_pixbuf_new_from_file (icon_name, NULL);
g_free (icon_name);
- g_return_if_fail (pixbuf != NULL);
+ if (pixbuf == NULL) return;
+
gtk_list_store_set (GTK_LIST_STORE (dv->priv->model),
&iter, COL_IMAGE, pixbuf, -1);
g_object_unref (pixbuf);