mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Codechange: nullptr deletion in DeleteWindowById (#8941)
This commit is contained in:
parent
c64b0946e8
commit
0cb99c5523
@ -1165,8 +1165,7 @@ Window *FindWindowByClass(WindowClass cls)
|
||||
void DeleteWindowById(WindowClass cls, WindowNumber number, bool force)
|
||||
{
|
||||
Window *w = FindWindowById(cls, number);
|
||||
if (force || w == nullptr ||
|
||||
(w->flags & WF_STICKY) == 0) {
|
||||
if (w != nullptr && (force || (w->flags & WF_STICKY) == 0)) {
|
||||
delete w;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user