Coverity: Uncaught exception

This commit is contained in:
wmayer
2020-07-19 18:22:16 +02:00
parent f37c728a2c
commit 1a34d3da1f
4 changed files with 42 additions and 7 deletions

View File

@@ -125,7 +125,7 @@ PyObject * Exception::getPyObject(void)
void Exception::setPyObject( PyObject * pydict)
{
if (pydict!=NULL) {
if (pydict && Py::_Dict_Check(pydict)) {
Py::Dict edict(pydict);
if (edict.hasKey("sfile"))
_file = static_cast<std::string>(Py::String(edict.getItem("sfile")));