[gimp/metadata-browser] file-cel: make generating thumbnails more robust
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] file-cel: make generating thumbnails more robust
- Date: Thu, 13 Sep 2012 00:40:48 +0000 (UTC)
commit ecb364ef2fe9ed31eafbaf4ad024c330dfd5b711
Author: Nils Philippsen <nils redhat com>
Date: Thu Sep 6 12:42:48 2012 +0200
file-cel: make generating thumbnails more robust
Ran non-interactively, file-cel could crash e.g. if loading an image to
generate a thumbnail, because there is no way to specify a palette file
in that case.
plug-ins/common/file-cel.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index 6292d7a..f1aed6f 100644
--- a/plug-ins/common/file-cel.c
+++ b/plug-ins/common/file-cel.c
@@ -186,7 +186,10 @@ run (const gchar *name,
if (run_mode == GIMP_RUN_NONINTERACTIVE)
{
palette_file = param[3].data.d_string;
- data_length = strlen (palette_file) + 1;
+ if (palette_file)
+ data_length = strlen (palette_file) + 1;
+ else
+ data_length = 0;
}
else if (run_mode == GIMP_RUN_INTERACTIVE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]