Skip to content

Commit

Permalink
fix: add null check for extras
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliu9508 committed Dec 6, 2024
1 parent 7c15a59 commit 959fe9a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class PermissionsActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

if (!OneSignal.initWithContext(this)) {
// unable to request for permission if initWithContext is not called or savedInstanceState is null
if (!OneSignal.initWithContext(this) || savedInstanceState == null) {
return
}

Expand Down

0 comments on commit 959fe9a

Please sign in to comment.