gh-154749: Reject a terminal-less screen in curses.set_term() (GH-154750)

set_term() accepted a screen returned by new_prescr(), which has no
terminal, and the next refresh crashed inside curses.  Raise
curses.error instead.
3 files changed