diff options
Diffstat (limited to 'gobject/pygsource.c')
-rw-r--r-- | gobject/pygsource.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gobject/pygsource.c b/gobject/pygsource.c index 900bd4f..9e831e5 100644 --- a/gobject/pygsource.c +++ b/gobject/pygsource.c @@ -418,14 +418,12 @@ pyg_source_prepare(GSource *source, gint *timeout) } ret = PyObject_IsTrue(PyTuple_GET_ITEM(t, 0)); - - if (ret) { *timeout = PyInt_AsLong(PyTuple_GET_ITEM(t, 1)); + if (*timeout == -1 && PyErr_Occurred()) { ret = FALSE; goto bail; } - } got_err = FALSE; |