Merge pull request #286 from peace-maker/noradiomenu_regression
Fix crash regression in games that don't support radio style menus (r=psychonic).
This commit is contained in:
		
						commit
						e5fb8984f4
					
				@ -83,6 +83,10 @@ void CRadioStyle::OnSourceModLevelChange(const char *mapName)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	g_bRadioInit = true;
 | 
			
		||||
 | 
			
		||||
	// Always register the style. Use IsSupported() to check for validity before use.
 | 
			
		||||
	g_Menus.AddStyle(this);
 | 
			
		||||
 | 
			
		||||
	const char *msg = g_pGameConf->GetKeyValue("HudRadioMenuMsg");
 | 
			
		||||
	if (!msg || msg[0] == '\0')
 | 
			
		||||
	{
 | 
			
		||||
@ -118,7 +122,6 @@ void CRadioStyle::OnSourceModLevelChange(const char *mapName)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	g_Menus.AddStyle(this);
 | 
			
		||||
	g_Menus.SetDefaultStyle(this);
 | 
			
		||||
 | 
			
		||||
	g_UserMsgs.HookUserMessage(g_ShowMenuId, this, false);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user