From 550f8d8f7634d105ec837b351ed323fcf7fea03e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 10 May 2026 12:20:14 +0530 Subject: [PATCH] Cleanup previous PR --- src/calibre/utils/tts/piper.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/calibre/utils/tts/piper.cpp b/src/calibre/utils/tts/piper.cpp index c08f24cfa7..f0005eedcc 100644 --- a/src/calibre/utils/tts/piper.cpp +++ b/src/calibre/utils/tts/piper.cpp @@ -288,10 +288,7 @@ set_voice(PyObject *self, PyObject *args) { static PyObject* normalize(const char *text) { PyObject *t = PyUnicode_FromString(text); - if (!t) return NULL; - if (PyTuple_SetItem(normalize_data.args, 1, t) != 0) { - return NULL; - } + if (!t || PyTuple_SetItem(normalize_data.args, 1, t) != 0) return NULL; return PyObject_CallObject(normalize_data.func, normalize_data.args); }