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

pull/155/head
rubidium 10 years ago
parent 3ef8ddce2b
commit 1149f7be46

@ -279,6 +279,9 @@ static SmallMapColourScheme _heightmap_schemes[] = {
*/
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
* selection of height levels. All entries with STR_TINY_BLACK_HEIGHT are reserved for this.

Loading…
Cancel
Save