Skip to content

Commit

Permalink
smurf: Guard against seg fault if an error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
David Berry committed Sep 30, 2014
1 parent eeefd91 commit e70ec0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions applications/smurf/libsmurf/smurf_jsatileinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void smurf_jsatileinfo( int *status ) {
status );

/* Create all-sky map using XPH projection. */
if( usexph ) {
if( usexph && *status == SAI__OK ) {

/* Loop round every tile index. */
for( jtile = 0; jtile < skytiling.ntiles; jtile++ ) {
Expand Down Expand Up @@ -352,7 +352,7 @@ void smurf_jsatileinfo( int *status ) {
}

/* Create all-sky map using HPX projection. */
} else {
} else if( *status == SAI__OK ){

/* Loop round every row and column */
for( j = 0; j < ubnd[ 1 ] - lbnd[ 1 ] + 1; j++ ) {
Expand Down

0 comments on commit e70ec0e

Please sign in to comment.