From 454b40039dd0a45a79f24ed7d3654a2576f01c79 Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:10:54 +0200 Subject: [PATCH] m.nviz.image: fix checking if color raster map exists if color_map param arg was used (#3139) --- misc/m.nviz.image/surface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/m.nviz.image/surface.c b/misc/m.nviz.image/surface.c index f2b577db295..51322ce9478 100644 --- a/misc/m.nviz.image/surface.c +++ b/misc/m.nviz.image/surface.c @@ -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],