mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r19432) -Fix [FS#3696] (r19357): crash when the error message 'owned by <town>' was shown
This commit is contained in:
parent
ef8deb2edd
commit
43be04eb27
@ -553,7 +553,7 @@ public:
|
|||||||
this->detailed_msg = detailed_msg;
|
this->detailed_msg = detailed_msg;
|
||||||
|
|
||||||
CompanyID company = (CompanyID)GetDParamX(this->decode_params, 2);
|
CompanyID company = (CompanyID)GetDParamX(this->decode_params, 2);
|
||||||
this->face = (this->detailed_msg == STR_ERROR_OWNED_BY && company <= MAX_COMPANIES) ? company : INVALID_COMPANY;
|
this->face = (this->detailed_msg == STR_ERROR_OWNED_BY && company < MAX_COMPANIES) ? company : INVALID_COMPANY;
|
||||||
const WindowDesc *desc = (face == INVALID_COMPANY) ? &_errmsg_desc : &_errmsg_face_desc;
|
const WindowDesc *desc = (face == INVALID_COMPANY) ? &_errmsg_desc : &_errmsg_face_desc;
|
||||||
|
|
||||||
assert(summary_msg != INVALID_STRING_ID);
|
assert(summary_msg != INVALID_STRING_ID);
|
||||||
|
Loading…
Reference in New Issue
Block a user