diff options
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 42776ca5e..797273af0 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -620,6 +620,12 @@ public: this->DrawWidgets(); } + virtual void OnInvalidateData(int data) + { + /* If company gets shut down, while displaying an error about it, remove the error message. */ + if (this->face != INVALID_COMPANY && !Company::IsValidID(this->face)) delete this; + } + virtual void SetStringParameters(int widget) const { if (widget == EMW_CAPTION) CopyInDParam(0, this->decode_params, lengthof(this->decode_params)); |