X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/217099990c2665d18d352c60058106da9a014ab8..942285dcfa083d114cf519d15099ce204b9895e8:/src/univ/textctrl.cpp diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 9d5bdc38c3..09bf799a15 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -1736,6 +1736,8 @@ wxTextCoord wxTextCtrl::GetRowsPerLine(wxTextCoord line) const wxTextCoord wxTextCtrl::GetRowCount() const { wxTextCoord count = GetLineCount(); + if (count == 0) + return 0; if ( WrapLines() ) { count = GetFirstRowOfLine(count - 1) +