Detect perm errors in DBM colors

This commit is contained in:
Gareth Evans
2017-03-04 19:13:37 +00:00
parent 7fb07b1793
commit af13a8d4ba
3 changed files with 12 additions and 9 deletions

View File

@@ -528,7 +528,7 @@ void DoRxdPwr(char *filename, unsigned char geo, unsigned char kml,
image_ctx_t ctx;
int success;
if((success = image_init(&ctx, width, (kml ? height : height + 30), IMAGE_RGB, IMAGE_DEFAULT)) != 0){
if( (success = image_init(&ctx, width, (kml ? height : height + 30), IMAGE_RGB, IMAGE_DEFAULT)) != 0 ){
fprintf(stderr,"Error initializing image\n");
exit(success);
}
@@ -538,7 +538,10 @@ void DoRxdPwr(char *filename, unsigned char geo, unsigned char kml,
255.0 / pow((double)(max_elevation - min_elevation),
one_over_gamma);
LoadDBMColors(xmtr[0]);
if( (success = LoadDBMColors(xmtr[0])) != 0 ){
fprintf(stderr,"Error loading DBM colors\n");
exit(success);
}
if( filename != NULL ) {