rsms / peertalk

iOS and Mac Cocoa library for communicating over USB
https://rsms.me/peertalk/
MIT License
3.43k stars 502 forks source link

Fix crash in -[PTProtocol readPayloadOfSize:overChannel:] #42

Closed nickdowell closed 6 years ago

nickdowell commented 7 years ago

data can be NULL when a connection is closed or lost, this change simply checks for this before calling dispatch_data_get_size()