1
0
Fork 0

(svn r27036) -Fix [FS#6148] (r26928): crash when changing smallmap colour when the smallmap window has not been opened yet

release/1.5
rubidium 2014-10-23 10:50:34 +00:00
parent 0c0f660059
commit 1d27ae9bda
1 changed files with 3 additions and 0 deletions

View File

@ -279,6 +279,9 @@ static SmallMapColourScheme _heightmap_schemes[] = {
*/ */
void BuildLandLegend() void BuildLandLegend()
{ {
/* The smallmap window has never been initialized, so no need to change the legend. */
if (_heightmap_schemes[0].height_colours == NULL) return;
/* /*
* The general idea of this function is to fill the legend with an appropriate evenly spaced * The general idea of this function is to fill the legend with an appropriate evenly spaced
* selection of height levels. All entries with STR_TINY_BLACK_HEIGHT are reserved for this. * selection of height levels. All entries with STR_TINY_BLACK_HEIGHT are reserved for this.