sharp_make_geom_info: Allow passing NULL as weights for all-one weights

This commit is contained in:
Dag Sverre Seljebotn 2012-11-06 14:28:03 +01:00
parent 93a01f769c
commit 0383da73b4
2 changed files with 4 additions and 2 deletions

View file

@ -176,7 +176,7 @@ void sharp_make_geom_info (int nrings, const int *nph, const ptrdiff_t *ofs,
infos[m].theta = theta[m];
infos[m].cth = cos(theta[m]);
infos[m].sth = sin(theta[m]);
infos[m].weight = weight[m];
infos[m].weight = (weight != NULL) ? weight[m] : 1.;
infos[m].phi0 = phi0[m];
infos[m].ofs = ofs[m];
infos[m].stride = stride[m];