Skip to content

Commit

Permalink
m.nviz.image: fix checking if color raster map exists if color_map pa…
Browse files Browse the repository at this point in the history
…ram arg was used (OSGeo#3139)
  • Loading branch information
tmszi committed Sep 8, 2023
1 parent 2a7e701 commit 413d71b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions misc/m.nviz.image/surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ int load_rasters(const struct GParams *params, nv_data * data)
for (i = 0; i < nsurfs; i++) {
id = surf_list[i];
mapset = G_find_raster2(params->color_map->answers[i], "");
if (mapset == NULL) {
G_fatal_error(_("Raster map <%s> not found"),
params->color_map->answers[i]);
}
/* color */
/* check for color map */
if (i < ncolor_map && strcmp(params->color_map->answers[i], "")) {
if (mapset == NULL) {
G_fatal_error(_("Raster map <%s> not found"),
params->color_map->answers[i]);
}
Nviz_set_attr(id, MAP_OBJ_SURF, ATT_COLOR, MAP_ATT,
G_fully_qualified_name(params->
color_map->answers[i],
Expand Down

0 comments on commit 413d71b

Please sign in to comment.