File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ open class LocationMessageCell: MessageContentCell {
5858 and messagesCollectionView: MessagesCollectionView )
5959 {
6060 super. configure ( with: message, at: indexPath, and: messagesCollectionView)
61+
62+ guard case . location( let locationItem) = message. kind else { fatalError ( " Configuring LocationMessageCell with wrong message kind " ) }
63+ guard CLLocationCoordinate2DIsValid ( locationItem. location. coordinate) else {
64+ return
65+ }
66+
6167 guard let displayDelegate = messagesCollectionView. messagesDisplayDelegate else {
6268 fatalError ( MessageKitError . nilMessagesDisplayDelegate)
6369 }
@@ -71,8 +77,6 @@ open class LocationMessageCell: MessageContentCell {
7177 at: indexPath,
7278 in: messagesCollectionView)
7379
74- guard case . location( let locationItem) = message. kind else { fatalError ( " Configuring LocationMessageCell with wrong message kind " ) }
75-
7680 activityIndicator. startAnimating ( )
7781
7882 let snapshotOptions = MKMapSnapshotter . Options ( )
You can’t perform that action at this time.
0 commit comments