From 523517ad74de7c97e1eff027fa284b2239c5d7f9 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Wed, 3 Dec 2008 03:10:19 +0000 Subject: [PATCH] checking whether parse args really returned object (e.g. on allocation error) git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1157 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/ivr/IvrDialogBase.cpp | 2 +- apps/ivr/IvrSipDialog.cpp | 2 +- apps/ivr/IvrSipReply.cpp | 2 +- apps/ivr/IvrSipRequest.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/ivr/IvrDialogBase.cpp b/apps/ivr/IvrDialogBase.cpp index e7b2d77d..ad715a9e 100644 --- a/apps/ivr/IvrDialogBase.cpp +++ b/apps/ivr/IvrDialogBase.cpp @@ -36,7 +36,7 @@ static PyObject* IvrDialogBase_new(PyTypeObject *type, PyObject *args, PyObject return NULL; } - if (!PyCObject_Check(o_dlg)){ + if ((NULL == o_dlg) || !PyCObject_Check(o_dlg)){ Py_DECREF(self); return NULL; diff --git a/apps/ivr/IvrSipDialog.cpp b/apps/ivr/IvrSipDialog.cpp index 59093099..5485cd4d 100644 --- a/apps/ivr/IvrSipDialog.cpp +++ b/apps/ivr/IvrSipDialog.cpp @@ -26,7 +26,7 @@ static PyObject* IvrSipDialog_new(PyTypeObject *type, PyObject *args, PyObject * return NULL; } - if (!PyCObject_Check(o_dlg)){ + if ((NULL == o_dlg) || !PyCObject_Check(o_dlg)){ Py_DECREF(self); return NULL; diff --git a/apps/ivr/IvrSipReply.cpp b/apps/ivr/IvrSipReply.cpp index 0b60be20..684ec0a7 100644 --- a/apps/ivr/IvrSipReply.cpp +++ b/apps/ivr/IvrSipReply.cpp @@ -48,7 +48,7 @@ static PyObject* IvrSipReply_new(PyTypeObject *type, PyObject *args, PyObject *k return NULL; } - if (!PyCObject_Check(o_req)){ + if ((NULL == o_req) || !PyCObject_Check(o_req)){ Py_DECREF(self); return NULL; diff --git a/apps/ivr/IvrSipRequest.cpp b/apps/ivr/IvrSipRequest.cpp index dc724554..03da2fe0 100644 --- a/apps/ivr/IvrSipRequest.cpp +++ b/apps/ivr/IvrSipRequest.cpp @@ -49,7 +49,7 @@ static PyObject* IvrSipRequest_new(PyTypeObject *type, PyObject *args, PyObject return NULL; } - if (!PyCObject_Check(o_req)){ + if ((NULL == o_req) || !PyCObject_Check(o_req)){ Py_DECREF(self); return NULL;