1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-04-15 08:29:45 +00:00

[mod_python] scan-build: Called C++ object pointer is null

This commit is contained in:
Andrey Volk 2021-04-19 21:48:35 +03:00
parent 94337b33fb
commit 0d105c5683
2 changed files with 9 additions and 0 deletions
src/mod/languages/mod_python

@ -79,3 +79,11 @@
return resultobj;
fail:
return NULL;
@@ -10492,6 +10492,7 @@ SWIGINTERN PyObject *_wrap_Session_setSelf(PyObject *SWIGUNUSEDPARM(self), PyObj
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setSelf" "', argument " "1"" of type '" "PYTHON::Session *""'");
}
arg1 = reinterpret_cast< PYTHON::Session * >(argp1);
+ if (!arg1) SWIG_exception_fail(SWIG_ValueError, "in method '" "Session_setSelf" "', argument " "1"" is NULL");
arg2 = obj1;
(arg1)->setSelf(arg2);
resultobj = SWIG_Py_Void();

@ -10492,6 +10492,7 @@ SWIGINTERN PyObject *_wrap_Session_setSelf(PyObject *SWIGUNUSEDPARM(self), PyObj
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setSelf" "', argument " "1"" of type '" "PYTHON::Session *""'");
}
arg1 = reinterpret_cast< PYTHON::Session * >(argp1);
if (!arg1) SWIG_exception_fail(SWIG_ValueError, "in method '" "Session_setSelf" "', argument " "1"" is NULL");
arg2 = obj1;
(arg1)->setSelf(arg2);
resultobj = SWIG_Py_Void();