fix the crash if the given theme is not correct (Closes: #153203).

2005-02-10  Sebastien Bacher  <seb128@debian.org>

	* theme-thumbnailer.c: (main): fix the crash if the given theme
	is not correct (Closes: #153203).
This commit is contained in:
Sebastien Bacher 2005-02-10 22:03:12 +00:00 committed by Sebastien Bacher
parent df4007d87b
commit 7f827bf944
2 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2005-02-10 Sebastien Bacher <seb128@debian.org>
* theme-thumbnailer.c: (main): fix the crash if the given theme
is not correct (Closes: #153203).
2005-02-09 Sebastien Bacher <seb128@debian.org>
* theme-thumbnailer.c: (main): change back to the previous code,

View file

@ -141,10 +141,16 @@ main(int argc, char **argv)
theme = gnome_theme_read_meta_theme (uri);
gnome_vfs_uri_unref (uri);
pixbuf = generate_theme_thumbnail (theme, TRUE);
save_pixbuf(pixbuf, argv[2]);
gdk_pixbuf_unref(pixbuf);
if (theme) {
pixbuf = generate_theme_thumbnail (theme, TRUE);
save_pixbuf(pixbuf, argv[2]);
gdk_pixbuf_unref(pixbuf);
}
else {
g_printerr("usage: gnome-theme-thumbnailer theme output-image\n");
return 1;
}
return 0;
}