MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / UnshowCriticalError

Function UnshowCriticalError

src/error_gui.cpp:278–286  ·  view source on GitHub ↗

* Unshow the critical error. This has to happen when a critical * error is shown and we uninitialise the window system, i.e. * remove all the windows. */

Source from the content-addressed store, hash-verified

276 * remove all the windows.
277 */
278void UnshowCriticalError()
279{
280 ErrmsgWindow *w = dynamic_cast<ErrmsgWindow *>(FindWindowById(WC_ERRMSG, 0));
281 if (_window_system_initialized && w != nullptr) {
282 if (w->IsCritical()) _error_list.push_front(*w);
283 _window_system_initialized = false;
284 w->Close();
285 }
286}
287
288/**
289 * Display an error message in a window.

Callers 3

ClearErrorMessagesFunction · 0.85
UnInitWindowSystemFunction · 0.85
GenerateWorldFunction · 0.85

Calls 3

FindWindowByIdFunction · 0.85
IsCriticalMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected