bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823)

Reported by Svace static analyzer.
1 file changed