diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-08-21 12:47:40 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-08-21 12:47:40 +0000 |
| commit | 1f4b55735e64c34b8fc9778d32cecfd412c8e6f6 (patch) | |
| tree | 4895eeca08fe9f857190842b7481c9850043fa6b /src/runtime/python/pypgf.c | |
| parent | 08766585e6da5645a94f8cf798dc23ebe1ac6a64 (diff) | |
fix a crash in the python binding
Diffstat (limited to 'src/runtime/python/pypgf.c')
| -rw-r--r-- | src/runtime/python/pypgf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index 5adf91c10..6a798134a 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -1206,9 +1206,6 @@ Concr_parse(ConcrObject* self, PyObject *args, PyObject *keywds) heuristics, pyres->pool, out_pool); if (pyres->res == NULL) { - Py_DECREF(pyres); - pyres = NULL; - PgfToken tok = pgf_lexer_current_token(lexer); @@ -1221,6 +1218,9 @@ Concr_parse(ConcrObject* self, PyObject *args, PyObject *keywds) PyString_AsString(py_tok)); Py_DECREF(py_tok); } + + Py_DECREF(pyres); + pyres = NULL; } Py_XDECREF(py_lexer); |
