diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-08-12 14:50:44 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:17:11 -0300 |
commit | a6eb186fa5a349af171295d0ea9d60c4aec049b3 (patch) | |
tree | 2aba8b631b4a99d12e51d3c00873dd69c517e1f4 /libshiboken/basewrapper.cpp | |
parent | 593b6345a8906b043d854a57bcb84a55f3955340 (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/basewrapper.cpp')
-rw-r--r-- | libshiboken/basewrapper.cpp | 3 |
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) |