git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62609
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxNSTextViewControl::GetStyle(long position, wxTextAttr& style)
{
bool wxNSTextViewControl::GetStyle(long position, wxTextAttr& style)
{
+ if (m_textView && position >=0 && position < [[m_textView string] length]) {
NSTextStorage* storage = [m_textView textStorage];
NSFont* font = [storage attribute:NSFontAttributeName atIndex:position effectiveRange:NULL];
if (font)
NSTextStorage* storage = [m_textView textStorage];
NSFont* font = [storage attribute:NSFontAttributeName atIndex:position effectiveRange:NULL];
if (font)