X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..f8b2997476e15b63f1699b9f7b6f1db2ae6b440c:/src/univ/textctrl.cpp diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index b07df4b00e..3b15ef1070 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -1648,6 +1648,9 @@ wxString wxTextCtrl::GetLineText(wxTextCoord line) const } else // multiline { + //this is called during DoGetBestSize + if (line == 0 && GetLineCount() == 0) return wxEmptyString ; + wxCHECK_MSG( (size_t)line < GetLineCount(), _T(""), _T("line index out of range") );