[telegnome] Add some more warnings for pixbuf load errors
- From: Colin Watson <cjwatson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [telegnome] Add some more warnings for pixbuf load errors
- Date: Sat, 30 Jan 2016 13:38:00 +0000 (UTC)
commit 89a606600f2eaca157633b8b35d1ecb3b9b1e0c8
Author: Colin Watson <cjwatson debian org>
Date: Sat Jan 30 13:35:12 2016 +0000
Add some more warnings for pixbuf load errors
src/http.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/http.c b/src/http.c
index c82617c..7382887 100644
--- a/src/http.c
+++ b/src/http.c
@@ -100,7 +100,13 @@ tg_http_get_image (GdkPixbuf **pixbuf)
NULL, NULL);
if (bytes_read == 0)
break;
- if (!gdk_pixbuf_loader_write(loader, buf, (gsize)bytes_read, NULL)) {
+ err = NULL;
+ if (!gdk_pixbuf_loader_write(loader, buf, (gsize)bytes_read, &err)) {
+ if (err) {
+ g_warning("Unable to parse image from '%s': %s",
+ http_query, err->message);
+ g_error_free(err);
+ }
retval = TG_ERR_PIXBUF;
goto out;
}
@@ -108,6 +114,8 @@ tg_http_get_image (GdkPixbuf **pixbuf)
*pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
if (!*pixbuf) {
+ g_warning("Pixbuf loader did not create a pixbuf from '%s'",
+ http_query);
retval = TG_ERR_PIXBUF;
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]