Commit 0dab4645 authored by Dalai Felinto's avatar Dalai Felinto
Browse files

Fix crash on quit

parent 224545aa
......@@ -151,7 +151,8 @@ class HMD_Base:
"""
try:
for i in range(2):
gpu.offscreen_object_free(self._offscreen_object[i])
if self._offscreen_object[i]:
gpu.offscreen_object_free(self._offscreen_object[i])
except Exception as E:
print(E)
......
......@@ -87,7 +87,7 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
return {'RUNNING_MODAL'}
else:
# quit right away
wm.virtual_reality.is_enabled = False
vr.is_enabled = False
self._quit(context)
self.report({'ERROR'}, "Error initializing device")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment