Skip to content

Commit cb5d8d7

Browse files
committed
Fix #482
1 parent 531f4fa commit cb5d8d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/core/modules/memory/memory_utilities.h

+8
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ inline unsigned long ExtractAddress(object oPtr, bool bValidate = false)
6767
{
6868
CPointer* pPtr;
6969

70+
if (oPtr.is_none()) {
71+
if (bValidate) {
72+
BOOST_RAISE_EXCEPTION(PyExc_ValueError, "Pointer is NULL.")
73+
}
74+
75+
return 0;
76+
}
77+
7078
extract<CPointer *> extractor(oPtr);
7179
if (!extractor.check())
7280
{

0 commit comments

Comments
 (0)