From: Andrey Volk Date: Mon, 19 Apr 2021 18:48:35 +0000 (+0300) Subject: [mod_python] scan-build: Called C++ object pointer is null X-Git-Tag: v1.10.7^2~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d105c5683b6407b439a449a7a3f3219165b88ce;p=thirdparty%2Ffreeswitch.git [mod_python] scan-build: Called C++ object pointer is null --- diff --git a/src/mod/languages/mod_python/hack.diff b/src/mod/languages/mod_python/hack.diff index 27bbe275e2..771be152d0 100644 --- a/src/mod/languages/mod_python/hack.diff +++ b/src/mod/languages/mod_python/hack.diff @@ -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(); diff --git a/src/mod/languages/mod_python/mod_python_wrap.cpp b/src/mod/languages/mod_python/mod_python_wrap.cpp index 227b441b59..e8db10c7c0 100644 --- a/src/mod/languages/mod_python/mod_python_wrap.cpp +++ b/src/mod/languages/mod_python/mod_python_wrap.cpp @@ -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();