From f50adb011adda11ea5e923a4270d892764654b3f Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Sat, 18 Nov 2006 22:30:23 +0000 Subject: [PATCH] Set return_val before destroying values[] as it may still be needed. 2006-11-18 Kevin Cozens * plug-ins/script-fu/scheme-wrapper.c (marshall_proc_db_call): Set return_val before destroying values[] as it may still be needed. --- ChangeLog | 5 +++++ plug-ins/script-fu/scheme-wrapper.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65a448ac57..82e97950c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-18 Kevin Cozens + + * plug-ins/script-fu/scheme-wrapper.c (marshall_proc_db_call): Set + return_val before destroying values[] as it may still be needed. + 2006-11-18 Michael Natterer * etc/gtkrc: remove example about adding a help keybinding diff --git a/plug-ins/script-fu/scheme-wrapper.c b/plug-ins/script-fu/scheme-wrapper.c index 562f5dd0b9..d6f059ef07 100644 --- a/plug-ins/script-fu/scheme-wrapper.c +++ b/plug-ins/script-fu/scheme-wrapper.c @@ -1524,6 +1524,16 @@ fprintf (stderr, " data '%.*s'\n", break; } + /* If we have no return value(s) from PDB call, return */ + /* either TRUE or FALSE to indicate if call succeeded. */ + if (return_val == sc->NIL) + { + if (values[0].data.d_status == GIMP_PDB_SUCCESS) + return_val = sc->vptr->cons (sc, sc->T, sc->NIL); + else + return_val = sc->vptr->cons (sc, sc->F, sc->NIL); + } + /* free the proc name */ g_free (proc_name); @@ -1552,16 +1562,6 @@ fprintf (stderr, " data '%.*s'\n", gtk_main_iteration (); #endif - /* If we have no return value(s) from PDB call, return */ - /* either TRUE or FALSE to indicate if call succeeded. */ - if (return_val == sc->NIL) - { - if (values[0].data.d_status == GIMP_PDB_SUCCESS) - return_val = sc->vptr->cons (sc, sc->T, sc->NIL); - else - return_val = sc->vptr->cons (sc, sc->F, sc->NIL); - } - return return_val; }