[gimp] Bug 777403 - Calling (file-png-get-defaults) crashes the file-png plug-in
- From: Michael Schumacher <schumaml src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 777403 - Calling (file-png-get-defaults) crashes the file-png plug-in
- Date: Fri, 29 Dec 2017 11:05:54 +0000 (UTC)
commit f658ea407153b0676f8e6cbb5010baeab5e93b0d
Author: Massimo Valentini <mvalentini src gnome org>
Date: Fri Dec 29 07:36:58 2017 +0100
Bug 777403 - Calling (file-png-get-defaults) crashes the file-png plug-in
commit 21bed1e2fb438fa5721bddb0573a724ae0024455
moved the lines
+ run_mode = param[0].data.d_int32;
+
without considering the plug-in registers parameterless
procedures
plug-ins/common/file-png.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 57556aa..d3327f2 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -428,13 +428,14 @@ run (const gchar *name,
GimpParam **return_vals)
{
static GimpParam values[10];
- GimpRunMode run_mode;
+ GimpRunMode run_mode = GIMP_RUN_NONINTERACTIVE;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GError *error = NULL;
- run_mode = param[0].data.d_int32;
+ if (nparams)
+ run_mode = param[0].data.d_int32;
INIT_I18N ();
gegl_init (NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]