We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82acc58 commit 6c82f9eCopy full SHA for 6c82f9e
iOS_SDK/OneSignalSDK/Source/OSInAppMessageViewController.m
@@ -276,6 +276,9 @@ - (NSString *)setContentInsetsInHTML:(NSString *)html {
276
NSMutableString *newHTML = [[NSMutableString alloc] initWithString:html];
277
if (@available(iOS 11, *)) {
278
UIWindow *keyWindow = UIApplication.sharedApplication.keyWindow;
279
+ if (!keyWindow) {
280
+ return newHTML;
281
+ }
282
CGFloat top = keyWindow.safeAreaInsets.top;
283
CGFloat bottom = keyWindow.safeAreaInsets.bottom;
284
CGFloat right = keyWindow.safeAreaInsets.right;
0 commit comments