Changeset - r21575:52da6ae0d4f8
[Not reviewed]
master
0 1 0
rubidium - 10 years ago 2014-07-21 18:03:05
rubidium@openttd.org
(svn r26699) -Fix-ish: do not crash when trying to show an error about vehicle in a NewGRF and the NewGRF was not loaded at all
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -235,6 +235,9 @@ void ShowNewGrfVehicleError(EngineID eng
 
	const Engine *e = Engine::Get(engine);
 
	GRFConfig *grfconfig = GetGRFConfig(e->GetGRFID());
 

	
 
	/* Missing GRF. Nothing useful can be done in this situation. */
 
	if (grfconfig == NULL) return;
 

	
 
	if (!HasBit(grfconfig->grf_bugs, bug_type)) {
 
		SetBit(grfconfig->grf_bugs, bug_type);
 
		SetDParamStr(0, grfconfig->GetName());
0 comments (0 inline, 0 general)