diff options
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 2b2b4bd..1a13fd0e 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -1535,7 +1535,10 @@ static PyObject* floattime(_Py_clock_info_t *info) { _PyTime_timeval t; - _PyTime_gettimeofday_info(&t, info); + if (_PyTime_gettimeofday_info(&t, info) < 0) { + assert(info != NULL); + return NULL; + } return PyFloat_FromDouble((double)t.tv_sec + t.tv_usec * 1e-6); } |