davemds pushed a commit to branch master. http://git.enlightenment.org/enlightenment/modules/edgar.git/commit/?id=6e186dcb8558561ee06c86418a49656030560bcf
commit 6e186dcb8558561ee06c86418a49656030560bcf Author: Dave Andreoli <[email protected]> Date: Fri Sep 11 22:49:24 2015 +0200 More correct usage of PyErr_Print() that function can crash if no errors really occurred --- src/e_mod_edgar.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/e_mod_edgar.c b/src/e_mod_edgar.c index 55ff56f..33d6f14 100644 --- a/src/e_mod_edgar.c +++ b/src/e_mod_edgar.c @@ -73,13 +73,17 @@ static PyObject *edjeEdjeType; #define PY_ON_ERROR_RETURN(_extra_check_, _ret_val_, _msg_) \ - if (PyErr_Occurred() || _extra_check_) { \ + if (PyErr_Occurred()) { \ PyErr_Print(); \ PyRun_SimpleString("sys.stdout.flush()"); \ PyRun_SimpleString("sys.stderr.flush()"); \ if (_msg_) DBG("EDGAR: ERROR "_msg_); \ return _ret_val_; \ } \ + if (_extra_check_) { \ + if (_msg_) DBG("EDGAR: ERROR "_msg_); \ + return _ret_val_; \ + } \ #if (PY_VERSION_HEX < 0x03030000) @@ -294,7 +298,7 @@ edgar_gadget_unload(Edgar_Py_Gadget *gadget) // kill all the active popups edje obj EINA_LIST_FOREACH_SAFE(gadget->pops_obj, l, l2, popup_content) - E_FREE_FUNC(popup_content, evas_object_del); + E_FREE_FUNC(popup_content, evas_object_del); // Free the gadcon client class e_gadcon_provider_unregister(gadget->cclass); --
