summaryrefslogtreecommitdiffstats
path: root/libshiboken/basewrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libshiboken/basewrapper.cpp')
-rw-r--r--libshiboken/basewrapper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 04ab3a8f..9b36ba0d 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -54,7 +54,8 @@ PyBaseWrapper_New(PyTypeObject* instanceType, ShiboTypeObject* baseWrapperType,
if (((ShiboTypeObject*) instanceType)->mi_offsets) {
int* offset = ((ShiboTypeObject*) instanceType)->mi_offsets;
while (*offset != -1) {
- BindingManager::instance().assignWrapper(self, (void*) ((size_t) cptr + (*offset)));
+ if (*offset > 0)
+ BindingManager::instance().assignWrapper(self, (void*) ((size_t) cptr + (*offset)));
offset++;
}
}