Don't crash if no scrollbar

Force wxVSCROLL in wxRTC


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2009-03-03 13:12:52 +00:00
parent 87ebb0b789
commit 6d595f3d7a
2 changed files with 5 additions and 0 deletions

View File

@@ -44,6 +44,9 @@ void wxScrollHelper::DoAdjustScrollbar(GtkRange* range,
int *lines,
int *linesPerPage)
{
if (!range)
return;
int upper;
int page_size;
if (pixelsPerLine > 0 && winSize > 0 && winSize < virtSize)

View File

@@ -196,6 +196,8 @@ wxRichTextCtrl::wxRichTextCtrl(wxWindow* parent,
bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style,
const wxValidator& validator, const wxString& name)
{
style |= wxVSCROLL;
if (!wxTextCtrlBase::Create(parent, id, pos, size,
style|wxFULL_REPAINT_ON_RESIZE,
validator, name))