Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'add_mesh_extra_objects/add_mesh_gears.py')
-rw-r--r--add_mesh_extra_objects/add_mesh_gears.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/add_mesh_extra_objects/add_mesh_gears.py b/add_mesh_extra_objects/add_mesh_gears.py
index 9655dea9..1d3bc70e 100644
--- a/add_mesh_extra_objects/add_mesh_gears.py
+++ b/add_mesh_extra_objects/add_mesh_gears.py
@@ -689,7 +689,8 @@ class AddGear(Operator, object_utils.AddObjectHelper):
if bpy.context.mode == "OBJECT":
if context.selected_objects != [] and context.active_object and \
- ('Gear' in context.active_object.data.keys()) and (self.change == True):
+ (context.active_object.data is not None) and ('Gear' in context.active_object.data.keys()) and \
+ (self.change == True):
obj = context.active_object
oldmesh = obj.data
oldmeshname = obj.data.name
@@ -910,7 +911,8 @@ class AddWormGear(Operator, object_utils.AddObjectHelper):
if bpy.context.mode == "OBJECT":
if context.selected_objects != [] and context.active_object and \
- ('WormGear' in context.active_object.data.keys()) and (self.change == True):
+ (context.active_object.data is not None) and ('WormGear' in context.active_object.data.keys()) and \
+ (self.change == True):
obj = context.active_object
oldmesh = obj.data
oldmeshname = obj.data.name