Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if options is NULL rather than options->option #8593

Merged
merged 2 commits into from
Oct 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/gmt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -18308,7 +18308,7 @@ GMT_LOCAL int gmtinit_parse_proj4(struct GMT_CTRL *GMT, char *item, char *dest)
}
else /* Not particularly useful yet because mapproject will fail anyway when scale != 1:1 */
GMT->current.proj.projection_GMT = GMT_NO_PROJ;

/* If input was a EPSG code, save the epsg -> proj conversion string. Save also if input was a +proj string */
if (epsg2proj[0] != '\0') snprintf(GMT->common.J.proj4string, GMT_LEN256-1, "%s", epsg2proj);
else if (item_t1[0] == '+') snprintf(GMT->common.J.proj4string, GMT_LEN256-1, "%s", item_t1);
Expand Down Expand Up @@ -20547,7 +20547,7 @@ void gmt_auto_offsets_for_colorbar (struct GMT_CTRL *GMT, double offset[], int j
was = GMT->current.map.frame.draw;
gmtinit_conf_modern_override (GMT); /* Reset */
(void)gmt_getdefaults (GMT, NULL);
if (!GMT->parent->external || options->option) { /* So that externals can send a NULL ptr for options. 'Internal' is not affected */
if (!GMT->parent->external || options) { /* So that externals can send a NULL ptr for options. 'Internal' is not affected */
for (opt = options; opt; opt = opt->next) {
if (opt->option != '-') continue; /* Not a parameter setting */
if ((c = strchr(opt->arg, '=')) == NULL) continue;
Expand Down
Loading