Skip to content

Commit

Permalink
Fix a crash in externals when in-memory needs to be reinterpolated. (#…
Browse files Browse the repository at this point in the history
…8406)

Fixes #5715 but this unveiled other bugs in grdblend that will be addressed later.
  • Loading branch information
joa-quim committed Mar 16, 2024
1 parent 29bb9b7 commit 83f885e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/grdblend.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,9 @@ GMT_LOCAL int grdblend_init_blend_job (struct GMT_CTRL *GMT, char **files, unsig
return (-GMT_RUNTIME_ERROR);
t = NULL; /* To remind us that this is now gone */
if ((B[n].G = GMT_Read_Data (GMT->parent, GMT_IS_GRID, GMT_IS_FILE, GMT_IS_SURFACE, GMT_CONTAINER_ONLY|GMT_GRID_ROW_BY_ROW, NULL, B[n].file, NULL)) == NULL) {
return (-GMT_DATA_READ_ERROR);
return -GMT_DATA_READ_ERROR;
}
B[n].memory = false; /* Since we read from file, even if it was a mem-grid before */
t = B[n].G->header; /* Since it got reallocated */
if (grdblend_overlap_check (GMT, &B[n], h, 0)) continue; /* In case grdconvert changed the region */
}
Expand Down

0 comments on commit 83f885e

Please sign in to comment.