[gnumeric] fix critical #677868



commit dd8835f003d248ec290d60f8e998a32b0cb89fc0
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Jun 12 09:44:38 2012 -0600

    fix critical #677868
    
    2012-06-12  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/commands.c (cmd_analysis_tool_finalize): do not pass a context
    	since the tools don't need it for TOOL_ENGINE_CLEAN_UP and it may not
    	be valid

 ChangeLog         |    6 ++++++
 src/commands.c    |    3 +--
 src/tools/tools.h |    2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8cf6e87..1b9d567 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-12  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/commands.c (cmd_analysis_tool_finalize): do not pass a context
+	since the tools don't need it for TOOL_ENGINE_CLEAN_UP and it may not
+	be valid
+
 2012-06-11  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* component/Gnumeric-embed.xml.in: add ToolsOneMeanTest
diff --git a/src/commands.c b/src/commands.c
index 606fb1d..102eb50 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -5352,14 +5352,13 @@ static void
 cmd_analysis_tool_finalize (GObject *cmd)
 {
 	CmdAnalysis_Tool *me = CMD_ANALYSIS_TOOL (cmd);
-	GOCmdContext *cc = GO_CMD_CONTEXT (me->dao->wbc);
 
 	if (me->col_info)
 		me->col_info = colrow_state_list_destroy (me->col_info);
 	if (me->row_info)
 		me->row_info = colrow_state_list_destroy (me->row_info);
 
-	me->engine (cc, me->dao, me->specs, TOOL_ENGINE_CLEAN_UP, NULL);
+	me->engine (NULL, me->dao, me->specs, TOOL_ENGINE_CLEAN_UP, NULL);
 
 	if (me->specs_owned) {
 		g_free (me->specs);
diff --git a/src/tools/tools.h b/src/tools/tools.h
index 926f60d..6dfb55f 100644
--- a/src/tools/tools.h
+++ b/src/tools/tools.h
@@ -30,6 +30,8 @@ typedef enum {
 	TOOL_ENGINE_CLEAN_UP
 } analysis_tool_engine_t;
 
+/* Note: when the engine is called with TOOL_ENGINE_CLEAN_UP, the GOCmdContext *gcc will be NULL. */
+
 typedef gboolean (* analysis_tool_engine) (GOCmdContext *gcc,
 					   data_analysis_output_t *dao, gpointer specs,
 					   analysis_tool_engine_t selector, gpointer result);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]