diff options
-rw-r--r-- | intern/cycles/blender/addon/__init__.py | 5 | ||||
-rw-r--r-- | intern/cycles/device/device.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/blender/addon/__init__.py b/intern/cycles/blender/addon/__init__.py index 8d4438cae24..5a7a028a0ea 100644 --- a/intern/cycles/blender/addon/__init__.py +++ b/intern/cycles/blender/addon/__init__.py @@ -98,6 +98,8 @@ def register(): from . import presets import atexit + # Make sure wee only registered the callback once. + atexit.unregister(engine_exit) atexit.register(engine_exit) engine.init() @@ -122,6 +124,3 @@ def unregister(): properties.unregister() presets.unregister() bpy.utils.unregister_module(__name__) - - atexit.unregister(engine_exit) - engine_exit() diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp index 90211b23aa1..8c01bcb116f 100644 --- a/intern/cycles/device/device.cpp +++ b/intern/cycles/device/device.cpp @@ -368,6 +368,8 @@ void Device::tag_update() void Device::free_memory() { + need_types_update = true; + need_devices_update = true; types.free_memory(); devices.free_memory(); } |