[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:58 UTC 2009
The following commit has been merged in the upstream branch:
commit d49b64714268da1bbeacd84be8127728edf7359a
Author: Stephane Popinet <popinet at users.sf.net>
Date: Wed Jan 14 22:14:08 2009 +1100
Bug fix for GfsInit erasing variables' descriptions
darcs-hash:20090114111408-d4795-ec320c29e2ec2fea9b28ef29e62e263e3021391f.gz
diff --git a/src/domain.c b/src/domain.c
index 9fd3bac..9f57508 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -2659,7 +2659,7 @@ GfsVariable * gfs_domain_add_variable (GfsDomain * domain,
*
* Adds a new variable @name to @domain or returns the variable of
* @domain with the same name. In either case the description of the
- * variable name is set to @description.
+ * variable name is set to @description (if it is not %NULL).
*
* Returns: the new or already existing variable or %NULL if @name is a
* reserved variable name.
@@ -2675,9 +2675,11 @@ GfsVariable * gfs_domain_get_or_add_variable (GfsDomain * domain,
v = gfs_variable_from_name (domain->variables, name);
if (v != NULL) {
- if (v->description)
- g_free (v->description);
- v->description = description ? g_strdup (description) : NULL;
+ if (description) {
+ if (v->description)
+ g_free (v->description);
+ v->description = g_strdup (description);
+ }
}
else
v = gfs_domain_add_variable (domain, name, description);
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list