From 1b127628cbd6a8d6c7e9ca46a91ed7bc7bc90733 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 8 Apr 2024 22:32:57 +0100 Subject: [PATCH] Codechange: Use dynamic_cast with FindWindowById. (#12458) Missed from 74e09ab. --- src/screenshot_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screenshot_gui.cpp b/src/screenshot_gui.cpp index 2505b7cbbe..2bfde67e89 100644 --- a/src/screenshot_gui.cpp +++ b/src/screenshot_gui.cpp @@ -83,7 +83,7 @@ void ShowScreenshotWindow() */ void SetScreenshotWindowVisibility(bool hide) { - ScreenshotWindow *scw = (ScreenshotWindow *)FindWindowById(WC_SCREENSHOT, 0); + ScreenshotWindow *scw = dynamic_cast(FindWindowById(WC_SCREENSHOT, 0)); if (scw == nullptr) return;