X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..7325e21c4fda06b0f4a2ea5fd72169bae06a0d19:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index bfcc9870fb..6297621fd0 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -471,8 +471,7 @@ bool wxWindow::Enable(bool enable) bool wxWindow::IsFocused() const { - wxWindow *self = wxConstCast(this, wxWindow); - return self->FindFocus() == self; + return FindFocus() == this; } bool wxWindow::IsPressed() const @@ -932,9 +931,9 @@ void wxWindow::SetScrollbar(int orient, void wxWindow::SetScrollPos(int orient, int pos, bool WXUNUSED(refresh)) { wxScrollBar *scrollbar = GetScrollbar(orient); - wxCHECK_RET( scrollbar, _T("no scrollbar to set position for") ); - scrollbar->SetThumbPosition(pos); + if (scrollbar) + scrollbar->SetThumbPosition(pos); // VZ: I think we can safely ignore this as we always refresh it // automatically whenever the value chanegs