Skip to content

Commit 178e72c

Browse files
authored
fix: ensure binding is initialized before accessing properties (#340)
Refs: #335
1 parent adbcd08 commit 178e72c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
### Added
99
- Option to disable the emoji key ([#234])
1010

11+
### Fixed
12+
- Fixed crash on initial startup in some cases ([#335])
13+
1114
## [1.6.0] - 2025-10-29
1215
### Added
1316
- Added Colemak, Colemak-DH, Workman, Asset, Niro, Soul layouts
@@ -125,6 +128,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
125128
[#259]: https://github.com/FossifyOrg/Keyboard/issues/259
126129
[#265]: https://github.com/FossifyOrg/Keyboard/issues/265
127130
[#274]: https://github.com/FossifyOrg/Keyboard/issues/274
131+
[#335]: https://github.com/FossifyOrg/Keyboard/issues/335
128132

129133
[Unreleased]: https://github.com/FossifyOrg/Keyboard/compare/1.6.0...HEAD
130134
[1.6.0]: https://github.com/FossifyOrg/Keyboard/compare/1.5.0...1.6.0

app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,10 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
547547
CUSTOM_PRIMARY_COLOR, CUSTOM_ACCENT_COLOR, IS_GLOBAL_THEME_ENABLED, IS_SYSTEM_THEME_ENABLED
548548
)
549549
) {
550-
keyboardView?.setupKeyboard()
551-
updateBackgroundColors()
550+
if (::binding.isInitialized) {
551+
keyboardView?.setupKeyboard()
552+
updateBackgroundColors()
553+
}
552554
}
553555
}
554556

0 commit comments

Comments
 (0)