diff --git a/docs/changelog.rst b/docs/changelog.rst index e1d0abdfad7..e05a84f79fa 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,13 @@ Changelog |kitty| is a feature full, cross-platform, *fast*, GPU based terminal emulator. To update |kitty|, :doc:`follow the instructions `. +0.14.6 [2019-09-23] +--------------------- + +- macOS: Fix a regression in the previous release that caused a crash when + pressing a unprintable key, such as the POWER key (:iss:`1997`) + + 0.14.5 [2019-09-23] --------------------- diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 5175984a709..292659db81c 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -345,10 +345,12 @@ static int translateKey(unsigned int key, bool apply_keymap) // Look for the effective key name after applying any keyboard layouts/mappings const char *name_chars = _glfwPlatformGetScancodeName(key); uint32_t name = 0; - for (int i = 0; i < 4; i++) { - if (!name_chars[i]) break; - name <<= 8; - name |= (uint8_t)name_chars[i]; + if (name_chars) { + for (int i = 0; i < 4; i++) { + if (!name_chars[i]) break; + name <<= 8; + name |= (uint8_t)name_chars[i]; + } } if (name) { // Key name