@@ -115,7 +115,7 @@ void CTeamMenu::ApplySchemeSettings(IScheme *pScheme)
115
115
116
116
if ( *m_szMapName )
117
117
{
118
- LoadMapPage ( m_szMapName ); // reload the map description to pick up the color
118
+ LoadMapPage ( NULL ); // reload the map description to pick up the color
119
119
}
120
120
}
121
121
@@ -185,22 +185,23 @@ void CTeamMenu::Update()
185
185
void CTeamMenu::LoadMapPage ( const char *mapName )
186
186
{
187
187
// Save off the map name so we can re-load the page in ApplySchemeSettings().
188
- Q_strncpy ( m_szMapName, mapName, strlen ( mapName ) + 1 );
189
-
188
+ if ( mapName )
189
+ Q_strncpy ( m_szMapName, mapName, strlen ( mapName ) + 1 );
190
+
190
191
char mapRES[ MAX_PATH ];
191
192
192
193
char uilanguage[ 64 ];
193
194
uilanguage[0 ] = 0 ;
194
195
engine->GetUILanguage ( uilanguage, sizeof ( uilanguage ) );
195
196
196
- Q_snprintf ( mapRES, sizeof ( mapRES ), " resource/maphtml/%s_%s.html" , mapName , uilanguage );
197
+ Q_snprintf ( mapRES, sizeof ( mapRES ), " resource/maphtml/%s_%s.html" , m_szMapName , uilanguage );
197
198
198
199
bool bFoundHTML = false ;
199
200
200
201
if ( !g_pFullFileSystem->FileExists ( mapRES ) )
201
202
{
202
203
// try english
203
- Q_snprintf ( mapRES, sizeof ( mapRES ), " resource/maphtml/%s_english.html" , mapName );
204
+ Q_snprintf ( mapRES, sizeof ( mapRES ), " resource/maphtml/%s_english.html" , m_szMapName );
204
205
}
205
206
else
206
207
{
@@ -240,7 +241,7 @@ void CTeamMenu::LoadMapPage( const char *mapName )
240
241
#endif
241
242
}
242
243
243
- Q_snprintf ( mapRES, sizeof ( mapRES ), " maps/%s.txt" , mapName );
244
+ Q_snprintf ( mapRES, sizeof ( mapRES ), " maps/%s.txt" , m_szMapName );
244
245
245
246
// if no map specific description exists, load default text
246
247
if ( !g_pFullFileSystem->FileExists ( mapRES ) )
0 commit comments