Skip to content

Commit dfa7b95

Browse files
[[ Bug 14205 ]] Apply further s_pending_key_down nil-ness checking
1 parent 1af0a22 commit dfa7b95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

engine/src/desktop.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,9 @@ void MCPlatformHandleTextInputInsertText(MCPlatformWindowRef p_window, unichar_t
923923
// SN-2015-01-20: [[ Bug 14406 ]] If we have a series of pending keys, we have two possibilities:
924924
// - typing IME characters: the characters are native, so we use the finsertnew
925925
// - typing dead characters: the character, if we arrive here, is > 127
926-
if (*p_chars > 127 && s_pending_key_down -> next && MCUnicodeMapToNative(p_chars, 1, t_char[0]))
926+
// SN-2015-04-13: [[ Bug 14205 ]] Ensure that s_pending_key_down is not nil
927+
if (*p_chars > 127 && s_pending_key_down && s_pending_key_down -> next
928+
&& MCUnicodeMapToNative(p_chars, 1, t_char[0]))
927929
{
928930
MCdispatcher -> wkdown(p_window, (const char *)t_char, *t_char);
929931
// SN-2014-11-03: [[ Bug 13832 ]] Enqueue the event, instead of firing it now (we are still in NSApplication's keyDown).

0 commit comments

Comments
 (0)