diff options
author | Jens Granseuer <jensgr@gmx.net> | 2008-03-11 17:37:09 +0000 |
---|---|---|
committer | Jens Granseuer <jensg@src.gnome.org> | 2008-03-11 17:37:09 +0000 |
commit | daa1c4b87637718b74b68440d38dd7d0125fdbcb (patch) | |
tree | 00be4c9117b92b51be25a2a596bc46a16a57be14 | |
parent | d3b988bc363b32d52a82287ebffb647dcb01ad3c (diff) | |
download | gnome-control-center-daa1c4b87637718b74b68440d38dd7d0125fdbcb.tar.gz |
handle failed thumbnailing attempts properly
2008-03-11 Jens Granseuer <jensgr@gmx.net>
* theme-thumbnailer.c: (main): handle failed thumbnailing attempts
properly
svn path=/trunk/; revision=8575
-rw-r--r-- | vfs-methods/themus/ChangeLog | 5 | ||||
-rw-r--r-- | vfs-methods/themus/theme-thumbnailer.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/vfs-methods/themus/ChangeLog b/vfs-methods/themus/ChangeLog index b5b87cd9f..a651ade1c 100644 --- a/vfs-methods/themus/ChangeLog +++ b/vfs-methods/themus/ChangeLog @@ -1,3 +1,8 @@ +2008-03-11 Jens Granseuer <jensgr@gmx.net> + + * theme-thumbnailer.c: (main): handle failed thumbnailing attempts + properly + 2008-01-29 Jens Granseuer <jensgr@gmx.net> * themus-properties-view.c: (add_atk_relation): don't leak the ATK diff --git a/vfs-methods/themus/theme-thumbnailer.c b/vfs-methods/themus/theme-thumbnailer.c index 49df38a22..ecff91f3a 100644 --- a/vfs-methods/themus/theme-thumbnailer.c +++ b/vfs-methods/themus/theme-thumbnailer.c @@ -143,8 +143,15 @@ main(int argc, char **argv) if (theme) { pixbuf = generate_meta_theme_thumbnail (theme); - save_pixbuf (pixbuf, argv[2]); - gdk_pixbuf_unref (pixbuf); + gnome_theme_meta_info_free (theme); + + if (pixbuf) { + save_pixbuf (pixbuf, argv[2]); + gdk_pixbuf_unref (pixbuf); + } else { + g_printerr ("could not generate thumbnail\n"); + return 1; + } } else { g_printerr ("usage: gnome-theme-thumbnailer theme output-image\n"); |