[gnumeric] Make sure the array returned by ARRAY has non-null values.



commit 6f2f14912a14f2b888dd77da057fb399d07ea592
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Mon Jul 12 13:53:28 2010 -0600

    Make sure the array returned by ARRAY has non-null values.
    
    2010-07-12  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* plugins/fn-lookup/functions.c (callback_function_array):
    	  make sure we have values, since some functions such as COUNT
    	  can't handle a matrix with NULL values.

 plugins/fn-lookup/ChangeLog   |    6 ++++++
 plugins/fn-lookup/functions.c |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/plugins/fn-lookup/ChangeLog b/plugins/fn-lookup/ChangeLog
index c69e5fa..c708440 100644
--- a/plugins/fn-lookup/ChangeLog
+++ b/plugins/fn-lookup/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-12  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* plugins/fn-lookup/functions.c (callback_function_array):
+	  make sure we have values, since some functions such as COUNT
+	  can't handle a matrix with NULL values.
+
 2010-07-11  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* plugins/fn-lookup/plugin.xml.in: new function SORT
diff --git a/plugins/fn-lookup/functions.c b/plugins/fn-lookup/functions.c
index 148a0ac..a2f2e9d 100644
--- a/plugins/fn-lookup/functions.c
+++ b/plugins/fn-lookup/functions.c
@@ -1710,7 +1710,8 @@ callback_function_array (GnmEvalPos const *ep, GnmValue const *value, void *clos
 {
 	GSList **list = closure;
 
-	*list = g_slist_prepend (*list, value_dup (value));
+	*list = g_slist_prepend 
+		(*list, value ? value_dup (value) : value_new_empty ());
 	return NULL;
 }
 



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