X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50259962667c5c7485fee30e602f2fe551efaf6f..d9b72d25405c4229b6195b581e6723f95d77e31d:/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 )