aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-08-12 14:50:44 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:11 -0300
commita6eb186fa5a349af171295d0ea9d60c4aec049b3 (patch)
tree2aba8b631b4a99d12e51d3c00873dd69c517e1f4 /libshiboken
parent593b6345a8906b043d854a57bcb84a55f3955340 (diff)
Check for NULL pointer on transferOwnership function.
fixes bug #965. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Lauro Neto <lauro.neto@openbossa.org>
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 0e2f2c89a..b5772e953 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -765,7 +765,8 @@ void getOwnership(SbkObject* self)
void getOwnership(PyObject* pyObj)
{
- setSequenceOwnership(pyObj, true);
+ if (pyObj)
+ setSequenceOwnership(pyObj, true);
}
void releaseOwnership(SbkObject* self)