daylen / stockfish-mac

Beautiful, powerful chess app for the Mac
http://stockfishchess.org/mac/
GNU General Public License v3.0
511 stars 116 forks source link

Fix a crash with New from Clipboard and non-text. #56

Closed ewanmellor closed 4 years ago

ewanmellor commented 5 years ago

Fix a crash when the user uses the New from Clipboard command and the clipboard does not contain text. In this case, NSPasteboard.stringForType returns nil, and we were crashing inside Position::is_valid_fen with a null pointer.

Show an NSAlert in this case instead.