Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyembree/rtcore_scene.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ cdef void error_printer(const rtc.RTCError code, const char *_str):
cdef class EmbreeScene:
def __init__(self, rtc.EmbreeDevice device=None):
if device is None:
# We store the embree device inside EmbreeScene to avoid premature deletion
self.device = rtc.EmbreeDevice()
device = self.device
device = rtc.EmbreeDevice()
# We store the embree device inside EmbreeScene to avoid premature deletion
self.device = device
rtc.rtcDeviceSetErrorFunction(device.device, error_printer)
self.scene_i = rtcDeviceNewScene(device.device, RTC_SCENE_STATIC, RTC_INTERSECT1)
self.is_committed = 0
Expand Down