[gimp/gimp-2-6] file-cel: make generating thumbnails more robust
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-6] file-cel: make generating thumbnails more robust
- Date: Thu, 6 Sep 2012 10:53:27 +0000 (UTC)
commit 9c7d65e16b142979f6370c6bb7b70759b953fb29
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.
(cherry picked from commit 96ce2c936dd2fb8cfbfcbadf95d667b7d6d47ca2)
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 3357561..0c3a8e8 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]