diff --git a/src/potential/grdseamount.c b/src/potential/grdseamount.c index 374604fb13e..08547d3dfb8 100644 --- a/src/potential/grdseamount.c +++ b/src/potential/grdseamount.c @@ -44,7 +44,7 @@ #define THIS_MODULE_MODERN_NAME "grdseamount" #define THIS_MODULE_LIB "potential" #define THIS_MODULE_PURPOSE "Create synthetic seamounts (Gaussian, parabolic, polynomial, cone or disc; circular or elliptical)" -#define THIS_MODULE_KEYS "C.code; /* Set default code if given */ - if (In->text[0]) { /* May have passed time information and/or code via trailing text */ + if (In->text && In->text[0]) { /* May have passed time information and/or code via trailing text */ int ns = sscanf (In->text, "%s %s %s", txt_x, txt_y, m); /* Only consider first three words */ if (Ctrl->T.active) { /* -T requires times t0, t1 */ if (ns == 1) { /* Possibly only shape code was given as trailing text */ @@ -1981,6 +1981,7 @@ EXTERN_MSC int GMT_grdseamount (void *V_API, int mode, void *args) { if (GMT_Set_Comment (API, GMT_IS_GRID, GMT_COMMENT_IS_OPTION | GMT_COMMENT_IS_COMMAND, options, Grid)) goto wrap_up; gmt_M_memcpy (data, Grid->data, Grid->header->size, gmt_grdfloat); /* This will go away once gmt_nc.c is fixed to leave array alone */ + if (API->GMT->current.io.col_type[GMT_X][0] == GMT_IS_LON) Grid->header->ProjRefPROJ4 = strdup("+proj=longlat"); if (GMT_Write_Data (API, GMT_IS_GRID, GMT_IS_FILE, GMT_IS_SURFACE, GMT_CONTAINER_AND_DATA, NULL, gfile, Grid) != GMT_NOERROR) goto wrap_up; gmt_M_memcpy (Grid->data, data, Grid->header->size, gmt_grdfloat);