]> Pileus Git - aweather/commitdiff
Use default colormap missing the correct one
authorAndy Spencer <andy753421@gmail.com>
Sun, 13 Feb 2011 08:10:31 +0000 (08:10 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 13 Feb 2011 08:20:38 +0000 (08:20 +0000)
src/plugins/level2.c

index fb39b8b259648fddd5559e0ab5dd418c0cbe2f7c..00e640bb8bb6a945b9d136e10fa509dbdf82643f 100644 (file)
@@ -221,7 +221,10 @@ void aweather_level2_set_sweep(AWeatherLevel2 *self,
        for (int i = 0; self->colormap[i].name; i++)
                if (self->colormap[i].type == type)
                        self->sweep_colors = &self->colormap[i];
        for (int i = 0; self->colormap[i].name; i++)
                if (self->colormap[i].type == type)
                        self->sweep_colors = &self->colormap[i];
-       if (!self->sweep_colors) return;
+       if (!self->sweep_colors) {
+               g_warning("AWeatherLevel2: set_sweep - missing colormap[%d]", type);
+               self->sweep_colors = &self->colormap[0];
+       }
 
        /* Load data */
        g_object_ref(self);
 
        /* Load data */
        g_object_ref(self);