Skip to content

Commit dc5d084

Browse files
committed
Fix occasional crashes
1 parent c6a219a commit dc5d084

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Vienna/Sources/Main window/BrowserTab+Interface.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,22 @@ extension BrowserTab {
9898

9999
if showRssButton {
100100
// show rss button
101-
rssButtonWidth.constant = 40
101+
rssButtonWidth?.constant = 40
102102
} else {
103103
// hide rss button
104-
rssButtonWidth.constant = 0
104+
rssButtonWidth?.constant = 0
105105
}
106106

107-
addressBarContainer.needsLayout = true
107+
addressBarContainer?.needsLayout = true
108108

109109
if viewVisible {
110110
NSAnimationContext.runAnimationGroup({_ in
111111
NSAnimationContext.current.duration = 0.2
112112
NSAnimationContext.current.allowsImplicitAnimation = true
113-
self.addressBarContainer.layoutSubtreeIfNeeded()
113+
self.addressBarContainer?.layoutSubtreeIfNeeded()
114114
}, completionHandler: nil)
115115
} else {
116-
self.addressBarContainer.layoutSubtreeIfNeeded()
116+
self.addressBarContainer?.layoutSubtreeIfNeeded()
117117
}
118118
}
119119

0 commit comments

Comments
 (0)