diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index b46c5ef885..303bfbf9d6 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -1036,7 +1036,7 @@ void SurfaceD2D::Init(SurfaceID sid, WindowID wid) if ( win && win->GetName() == "wxSTCCallTip" ) win = win->GetParent(); - wxStyledTextCtrl* const stc = wxDynamicCast(wid, wxStyledTextCtrl); + wxStyledTextCtrl* const stc = wxDynamicCast(win, wxStyledTextCtrl); if ( stc ) { wxDC* const dc = static_cast(sid);