diff --git a/ios/keyman/Keyman/SWKeyboard/KeyboardViewController.swift b/ios/keyman/Keyman/SWKeyboard/KeyboardViewController.swift index 9b34e35445..5c99baac4a 100644 --- a/ios/keyman/Keyman/SWKeyboard/KeyboardViewController.swift +++ b/ios/keyman/Keyman/SWKeyboard/KeyboardViewController.swift @@ -61,6 +61,13 @@ class KeyboardViewController: InputViewController { } func setupTopBarImage(size: CGSize) { + // We override the height in getTopBarImage, but not width. + // If width is 0, we return null from that function; this'll + // trigger the guard below. + if size.width == 0 { + return + } + let imgPath = getTopBarImage(size: size) guard let path = imgPath else { SentryManager.captureAndLog("No image specified for the image banner!")