We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d1841c commit b57b7b2Copy full SHA for b57b7b2
1 file changed
optix/module.pyx
@@ -9,6 +9,7 @@ from .pipeline cimport PipelineCompileOptions
9
from .pipeline import CompileDebugLevel
10
from .build import PrimitiveType, BuildFlags, CurveEndcapFlags
11
from .common import ensure_iterable
12
+from libc.stdint cimport uintptr_t
13
14
optix_init()
15
@@ -202,7 +203,8 @@ cdef class Module(OptixContextObject):
202
203
&self.module))
204
205
def __dealloc__(self):
- optix_check_return(optixModuleDestroy(self.module))
206
+ if <uintptr_t> self.module != 0:
207
+ optix_check_return(optixModuleDestroy(self.module))
208
209
@classmethod
210
def builtin_is_module(cls,
0 commit comments