X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..748fbf95a859df3b1b9f8b95ee8cd0cc4d205a85:/src/univ/textctrl.cpp diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 98b53bda8a..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 ///////////////////////////////////////////////////////////////////////////// @@ -138,6 +138,7 @@ #endif #include "wx/clipbrd.h" + #include "wx/textfile.h" #include "wx/caret.h" @@ -1735,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) +