gnumeric r16914 - trunk/plugins/fn-tsa



Author: jbrefort
Date: Wed Oct 22 19:43:04 2008
New Revision: 16914
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16914&view=rev

Log:
2008-10-22  Jean Brefort  <jean brefort normalesup org>

	* functions.c: (spline_interpolation), (spline_averaging): do not
	use a NULL GOCSpline struct. See #557442.



Modified:
   trunk/plugins/fn-tsa/ChangeLog
   trunk/plugins/fn-tsa/functions.c

Modified: trunk/plugins/fn-tsa/functions.c
==============================================================================
--- trunk/plugins/fn-tsa/functions.c	(original)
+++ trunk/plugins/fn-tsa/functions.c	Wed Oct 22 19:43:04 2008
@@ -275,6 +275,8 @@
 	int i;
 	struct GnmCSpline *sp = gnm_cspline_init (absc, ord, nb_knots,
 				   GO_CSPLINE_NATURAL, 0., 0.);
+	if (!sp)
+		return NULL;
 	if (go_range_increasing (targets, nb_targets))
 		res = gnm_cspline_get_values (sp, targets, nb_targets);
 	else {
@@ -299,6 +301,8 @@
 		return NULL;
 	sp = gnm_cspline_init (absc, ord, nb_knots,
 				   GO_CSPLINE_NATURAL, 0., 0.);
+	if (!sp)
+		return NULL;
 	res = gnm_cspline_get_integrals (sp, targets, nb_targets);
 	imax = nb_targets - 1;
 	for (i = 0; i < imax; i++)



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