X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/217099990c2665d18d352c60058106da9a014ab8..748fbf95a859df3b1b9f8b95ee8cd0cc4d205a85:/src/univ/textctrl.cpp?ds=inline diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 9d5bdc38c3..b6a4b8810d 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 15.09.00 // RCS-ID: $Id$ -// Copyright: (c) 2000 Vadim Zeitlin +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -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) +