diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index d9e586dcfe..799f068a92 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -282,6 +282,11 @@ void ShowStatusBar() } void CM_RedrawStatusBar() { - StatusBarWindow *w = dynamic_cast(FindWindowById(WC_STATUS_BAR, 0)); - w->ReInit(); + Window *w = FindWindowById(WC_STATUS_BAR, 0); + + if (w == nullptr) return; + + StatusBarWindow *st = static_cast(w); + + st->ReInit(); }