Skip to content

Commit 0c62b81

Browse files
MEET-4517: Fix crash by checking implicit optional
1 parent 5322cbc commit 0c62b81

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

iMEGA/CallScene/FloatingPanel/MeetingFloatingPanelViewController.swift

+10-5
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,18 @@ final class MeetingFloatingPanelViewController: UIViewController {
175175
isMeeting: Bool,
176176
allowNonHostToAddParticipantsEnabled: Bool,
177177
isMyselfAModerator: Bool) {
178-
178+
// checking if the implicitly unwrapped optional are loaded from XIBS yet [MEET-4517]
179179
if isOneToOneCall {
180-
optionsStackView.arrangedSubviews.forEach({ $0.removeFromSuperview() })
181-
optionsStackViewHeightConstraint.constant = 0.0
180+
if optionsStackView != nil {
181+
optionsStackView.arrangedSubviews.forEach({ $0.removeFromSuperview() })
182+
}
183+
if optionsStackViewHeightConstraint != nil {
184+
optionsStackViewHeightConstraint.constant = 0.0
185+
}
186+
}
187+
if shareLinkLabel != nil {
188+
shareLinkLabel.text = isMeeting ? Strings.Localizable.Meetings.Action.shareLink : Strings.Localizable.Meetings.Panel.shareLink
182189
}
183-
shareLinkLabel.text = isMeeting ? Strings.Localizable.Meetings.Action.shareLink : Strings.Localizable.Meetings.Panel.shareLink
184-
185190
isAllowNonHostToAddParticipantsEnabled = allowNonHostToAddParticipantsEnabled
186191
}
187192
}

0 commit comments

Comments
 (0)