summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-02-08 22:31:29 +0100
committerDaniel Friesel <derf@finalrewind.org>2013-02-08 22:31:29 +0100
commita889a9f9a866f5dea241773f04d52fafd3ab0175 (patch)
treee5fe30ad2e8e1d329d0475f7f94ff5c3e4d4246d
parent71eb9b41250c907398ee8be426a9e5e450abe06c (diff)
downloadfeh-a889a9f9a866f5dea241773f04d52fafd3ab0175.zip
fix imlib2 and x11 warnings when opening a URL that returned an HTTP error
-rw-r--r--ChangeLog2
-rw-r--r--src/imlib.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 561abfd..f4abf3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@ git HEAD
* Add --sort mtime option (patch by guns)
* Add a desktop file (installed to share/applications/feh.desktop)
* Use "feh -" to read image from stdin
+ * Fix Imlib2 and X11 warnings when opening a URL that returned an HTTP
+ error
Mon, 24 Dec 2012 15:45:54 +0100 Daniel Friesel <derf+feh@finalrewind.org>
diff --git a/src/imlib.c b/src/imlib.c
index 98a91be..2425050 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -224,7 +224,8 @@ int feh_load_image(Imlib_Image * im, feh_file * file)
|| (!strncmp(file->filename, "ftp://", 6))) {
image_source = SRC_HTTP;
- tmpname = feh_http_load_image(file->filename);
+ if ((tmpname = feh_http_load_image(file->filename)) == NULL)
+ err = IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST;
}
else
*im = imlib_load_image_with_error_return(file->filename, &err);