Changeset 5264 for anuga_work/development/anugavis/src/init.c
- Timestamp:
- May 1, 2008, 3:50:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anugavis/src/init.c
r5263 r5264 29 29 anugavis.x = NULL; 30 30 anugavis.y = NULL; 31 anugavis. cells = NULL;31 anugavis.volumes = NULL; 32 32 anugavis.heights = NULL; 33 33 if((SDL_Init(SDL_INIT_VIDEO) == -1) || … … 67 67 ((anugavis.y = xmalloc(sizeof(float) * anugavis.number_of_points, 68 68 "AnugaVis_Init()")) == NULL) || 69 ((anugavis.volumes = xmalloc(sizeof(int) 70 * anugavis.number_of_volumes 71 * anugavis.number_of_vertices, 72 "AnugaVis_Init()")) == NULL) || 69 73 (nc_get_var_float_by_name(anugavis.netcdfId, "x", 70 74 anugavis.x) != NC_NOERR) || 71 75 (nc_get_var_float_by_name(anugavis.netcdfId, "y", 72 anugavis.y) != NC_NOERR)){ 76 anugavis.y) != NC_NOERR) || 77 (nc_get_var_int_by_name(anugavis.netcdfId, "volumes", 78 anugavis.volumes) != NC_NOERR)){ 73 79 nc_close(anugavis.netcdfId); 74 80 if(anugavis.x != NULL) free(anugavis.x); 75 81 if(anugavis.y != NULL) free(anugavis.y); 82 if(anugavis.volumes != NULL) free(anugavis.volumes); 76 83 SDL_Quit(); 77 84 return -1; … … 86 93 free(anugavis.x); 87 94 free(anugavis.y); 95 free(anugavis.volumes); 88 96 SDL_Quit(); 89 97 }
Note: See TracChangeset
for help on using the changeset viewer.