Skip to content

Commit b4190ae

Browse files
authored
Merge pull request #82 from hjhcn/master
fix crash bug when use 'JLToastCenter.defaultCenter().cancelAllToast…
2 parents a4d3b6c + 63b0a83 commit b4190ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

JLToast/JLToast.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public struct JLToastDelay {
8686

8787
override public func start() {
8888
if !NSThread.isMainThread() {
89-
dispatch_async(dispatch_get_main_queue(), {
90-
self.start()
89+
dispatch_async(dispatch_get_main_queue(), {[weak self] in
90+
self?.start()
9191
})
9292
} else {
9393
super.start()

0 commit comments

Comments
 (0)