@@ -913,7 +913,9 @@ void MCPlatformHandleTextInputInsertText(MCPlatformWindowRef p_window, unichar_t
913913 // this wrong key is replaced by this new 'combined' char
914914 // if the key pressed fails to generate a char:
915915 // this wrong key is replaced by the dead-key char
916- if (t_was_compositing)
916+ // SN-2015-04-10: [[ Bug 14205 ]] When using the dictation, there is no
917+ // pending key down, but the composition was still on though.
918+ if (t_was_compositing && s_pending_key_down)
917919 {
918920 s_pending_key_down -> key_code = (uint1)*p_chars;
919921 s_pending_key_down -> mapped_codepoint = (uint1)*p_chars;
@@ -937,7 +939,9 @@ void MCPlatformHandleTextInputInsertText(MCPlatformWindowRef p_window, unichar_t
937939 // SN-2015-01-20: [[ Bug 14406 ]] If we have a series of pending keys, we have two possibilities:
938940 // - typing IME characters: the characters are native, so we use the finsertnew
939941 // - typing dead characters: the character, if we arrive here, is > 127
940- if (*p_chars > 127 && s_pending_key_down -> next && MCUnicodeMapToNative (p_chars, 1 , t_char[0 ]))
942+ // SN-2015-04-13: [[ Bug 14205 ]] Ensure that s_pending_key_down is not nil
943+ if (*p_chars > 127 && s_pending_key_down && s_pending_key_down -> next
944+ && MCUnicodeMapToNative (p_chars, 1 , t_char[0 ]))
941945 {
942946 MCStringCreateWithNativeChars ((const char_t *)t_char, 1 , &t_string);
943947 MCdispatcher -> wkdown (p_window, *t_string, *t_char);
0 commit comments