Codechange: Use dynamic_cast with FindWindowById. (#12458)

Missed from 74e09ab.
This commit is contained in:
Peter Nelson 2024-04-08 22:32:57 +01:00 committed by GitHub
parent 7e28605830
commit 1b127628cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ void ShowScreenshotWindow()
*/ */
void SetScreenshotWindowVisibility(bool hide) void SetScreenshotWindowVisibility(bool hide)
{ {
ScreenshotWindow *scw = (ScreenshotWindow *)FindWindowById(WC_SCREENSHOT, 0); ScreenshotWindow *scw = dynamic_cast<ScreenshotWindow *>(FindWindowById(WC_SCREENSHOT, 0));
if (scw == nullptr) return; if (scw == nullptr) return;