From: Chris Elliott Date: Sun, 20 Jun 2004 13:11:37 +0000 (+0000) Subject: fix bug with univ creating textctrl X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/290e4c83d99eba5a6cc25f67398f7670d4b95ff0?ds=inline fix bug with univ creating textctrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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") );