From 19c653c5affa0717a1fe627833b667bd0fb226a6 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 3 Jul 2004 23:16:28 +0000 Subject: Use regular return for valid error conditions, not g_return_if_fail. 2004-07-04 Christian Persch * embed/downloader-view.c: (downloader_view_add_download): Use regular return for valid error conditions, not g_return_if_fail. --- ChangeLog | 7 +++++++ embed/downloader-view.c | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9aa39eb26..b0866618a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-04 Christian Persch + + * embed/downloader-view.c: (downloader_view_add_download): + + Use regular return for valid error conditions, not + g_return_if_fail. + 2004-07-04 Christian Persch * embed/mozilla/mozilla-download.cpp: (impl_get_mime_type): 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); -- cgit v1.2.3