Skip to content

Commit b43deb5

Browse files
committed
BUGFIX: deleting empty arrays was causing segmentation faults
- Updated the check in __del__ to reflect Array.arr change to c_void_p
1 parent d88f251 commit b43deb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arrayfire/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def copy(self):
183183
return out
184184

185185
def __del__(self):
186-
if (self.arr.value != 0):
186+
if self.arr.value:
187187
clib.af_release_array(self.arr)
188188

189189
def device_ptr(self):

0 commit comments

Comments
 (0)