Handle wgetch errors in the curses window port.

This prevents infinite loops when the user disconnectes at a prompt e.g.
"Restoring the game failed. Would you like to remove it from the list?"