Fix crash with Vietnamese input method on macOS
This commit is contained in:
@@ -724,12 +724,13 @@ bool wxNSTextViewControl::CanFocus() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxNSTextViewControl::insertText(NSString* text, WXWidget slf, void *_cmd)
|
void wxNSTextViewControl::insertText(NSString* str, WXWidget slf, void *_cmd)
|
||||||
{
|
{
|
||||||
|
NSString *text = [str isKindOfClass:[NSAttributedString class]] ? [str string] : str;
|
||||||
if ( m_lastKeyDownEvent ==NULL || !DoHandleCharEvent(m_lastKeyDownEvent, text) )
|
if ( m_lastKeyDownEvent ==NULL || !DoHandleCharEvent(m_lastKeyDownEvent, text) )
|
||||||
{
|
{
|
||||||
wxOSX_TextEventHandlerPtr superimpl = (wxOSX_TextEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
|
wxOSX_TextEventHandlerPtr superimpl = (wxOSX_TextEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
|
||||||
superimpl(slf, (SEL)_cmd, text);
|
superimpl(slf, (SEL)_cmd, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user