X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50259962667c5c7485fee30e602f2fe551efaf6f..b3d006af0fca9ba3679f092016cf149c9f6fd06c:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 1443e57779..b9671b2850 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -943,6 +943,10 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y ) const if ( m_windowStyle & wxTE_MULTILINE ) { GtkTextIter iter; + + if (pos > GetLastPosition()) + return false; + gtk_text_buffer_get_iter_at_offset(m_buffer, &iter, pos); if ( y )