Commit 60c2e01b authored by Thomas White's avatar Thomas White
Browse files

Fix/add exit paths

parent ea369696
......@@ -248,6 +248,7 @@ struct rvec get_q(struct image *image, unsigned int xs, unsigned int ys,
const unsigned int y = ys / sampling; /* Integer part only */
p = find_panel(&image->det, x, y);
assert(p != NULL);
rx = ((float)xs - (sampling*p->cx)) / (sampling * p->res);
ry = ((float)ys - (sampling*p->cy)) / (sampling * p->res);
......
......@@ -319,6 +319,9 @@ int main(int argc, char *argv[])
image.height = 1024;
image.lambda = ph_en_to_lambda(eV_to_J(PHOTON_ENERGY)); /* Wavelength */
cell = load_cell_from_pdb(filename);
if ( cell == NULL ) {
exit(1);
}
image.filename = NULL;
image.features = NULL;
image.flags = NULL;
......
......@@ -167,9 +167,7 @@ static int integrate_peak(struct image *image, int xp, int yp,
}
p = find_panel(&image->det, x+xp, y+yp);
if ( p == NULL ) {
return 1;
}
if ( p == NULL ) return 1;
/* Area of one pixel */
pix_area = pow(1.0/p->res, 2.0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment