]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_python] scan-build: Called C++ object pointer is null
authorAndrey Volk <andywolk@gmail.com>
Mon, 19 Apr 2021 18:48:35 +0000 (21:48 +0300)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:44 +0000 (22:00 +0300)
src/mod/languages/mod_python/hack.diff
src/mod/languages/mod_python/mod_python_wrap.cpp

index 27bbe275e2377b42d1f7f5653e2fa86a061136db..771be152d0b0b760712920b4abcf85048494fbc3 100644 (file)
    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();
index 227b441b59fbf04d4880c16d8366a51df034b016..e8db10c7c03a27c7f894aa6df8e7df194706a7db 100644 (file)
@@ -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();