mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 07:11:12 +00:00
Add missing sanity check
This commit is contained in:
parent
dac59fabeb
commit
9794bb1973
1 changed files with 5 additions and 0 deletions
|
@ -375,6 +375,11 @@ int main(int argc, char *argv[]) {
|
|||
/* Now calculate volumes*/
|
||||
printf("Now finding volumes ...\n"); fflush(stdout);
|
||||
vols = new float[boxdata.nvp];
|
||||
if (vols == 0)
|
||||
{
|
||||
cout << "Unable to allocate vols" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (pid_t i = 0; i < boxdata.nvp; i++)
|
||||
{ /* Just the original particles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue