[Xfce4-commits] [apps/xfce4-terminal] 01/01: Print a warning if failed to open background image

noreply at xfce.org noreply at xfce.org
Mon Jan 23 14:55:33 CET 2017


This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit 772663daee24c091072427b0544e1537172ec3f3
Author: Igor <f2404 at yandex.ru>
Date:   Mon Jan 23 16:55:29 2017 +0300

    Print a warning if failed to open background image
---
 terminal/terminal-image-loader.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/terminal/terminal-image-loader.c b/terminal/terminal-image-loader.c
index c33fa09..1caf26c 100644
--- a/terminal/terminal-image-loader.c
+++ b/terminal/terminal-image-loader.c
@@ -141,8 +141,12 @@ terminal_image_loader_check (TerminalImageLoader *loader)
       if (GDK_IS_PIXBUF (loader->pixbuf))
         g_object_unref (G_OBJECT (loader->pixbuf));
 
-      gdk_pixbuf_get_file_info (loader->path, &width, &height);
-      if (width <= MAX_IMAGE_WIDTH && height <= MAX_IMAGE_HEIGHT)
+      if (gdk_pixbuf_get_file_info (loader->path, &width, &height) == NULL)
+        {
+          g_warning ("Unable to load background image file \"%s\"", loader->path);
+          loader->pixbuf = NULL;
+        }
+      else if (width <= MAX_IMAGE_WIDTH && height <= MAX_IMAGE_HEIGHT)
         loader->pixbuf = gdk_pixbuf_new_from_file (loader->path, NULL);
       else
         loader->pixbuf = gdk_pixbuf_new_from_file_at_size (loader->path,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list