AttributeError: 'NoneType' object has no attribute 'name'

Hello
Help me to solve this error
I have this addon https://db.tt/rc0Pw5sF
I run it on this scene https://db.tt/70fnZ1uq on camera “MAIN-01-v1” (for example)
When i run “make unreal” (Misc toolbar) i get this error


Traceback (most recent call last):
  File "/home/yeti/.config/blender/2.75/scripts/addons/YetiTools_v_0_10_10.py", line 579, in invoke
    UDK_Camera()
  File "/home/yeti/.config/blender/2.75/scripts/addons/YetiTools_v_0_10_10.py", line 550, in UDK_Camera
    name = bpy.path.clean_name(bpy.context.active_object.name)
AttributeError: 'NoneType' object has no attribute 'name'


location: <unknown location>:-1



How to fix script?

Without looking at the scripts, the error occurs because


bpy.context.active_object

can be None. Generally this is avoided by the poll method of either the operator or the panel. IMO it’s still worthwhile to check for it in code.