1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 19:02:41 +01:00

Codefix: check the result of dynamic_cast for nullptr

This commit is contained in:
Rubidium
2025-03-09 18:05:53 +01:00
committed by rubidium42
parent d07d75229b
commit 0de7fd3c24
4 changed files with 6 additions and 1 deletions

View File

@@ -1156,6 +1156,7 @@ void ShowQuery(EncodedString &&caption, EncodedString &&message, Window *parent,
if (w->window_class != WC_CONFIRM_POPUP_QUERY) continue;
QueryWindow *qw = dynamic_cast<QueryWindow *>(w);
assert(qw != nullptr);
if (qw->parent != parent || qw->proc != callback) continue;
qw->Close();