Cycles: Fix crash when trying to render after re-enabling the addon

This commit is contained in:
Sergey Sharybin
2016-02-16 12:47:12 +01:00
parent 0b03785eb5
commit c5e1781944
2 changed files with 4 additions and 3 deletions

View File

@@ -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()

View File

@@ -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();
}