Commit 1c97103
authored
fix(iam): prevent crash when dismissing IAM during view hierarchy changes (#1641)
Fix crash in -[OSInAppMessageViewController dismissCurrentInAppMessage:withVelocity:]
The crash occurred when setInAppMessagingPaused:YES was called while the IAM's
view hierarchy was in an inconsistent state (e.g., during orientation change).
The code attempted to modify Auto Layout constraints on a messageView that was
no longer a subview of self.view, causing an NSLayoutConstraint exception.
Added a guard check to return out early if messageView.superview != self.view.1 parent 24c8745 commit 1c97103
1 file changed
Lines changed: 8 additions & 3 deletions
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
520 | | - | |
521 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
522 | 527 | | |
523 | 528 | | |
524 | 529 | | |
| |||
0 commit comments