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 (#3139)
  • Loading branch information
tmszi committed Sep 8, 2023
1 parent 2a7e701 commit 454b400
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions misc/m.nviz.image/surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ 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], "")) {
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]);
}
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 454b400

Please sign in to comment.