Skip to content
Snippets Groups Projects
Commit 672cfe9c authored by Vladimir Spivak(cwolf3d)'s avatar Vladimir Spivak(cwolf3d)
Browse files

Fixed errors in the console if obj.data is None

Errors appeared when calling the context menu on an object without data
parent 3b0a5df4
No related branches found
No related tags found
No related merge requests found
......@@ -481,7 +481,7 @@ def Bolt_contex_menu(self, context):
obj = context.object
layout = self.layout
if 'Bolt' in obj.data.keys():
if obj.data is not None and 'Bolt' in obj.data.keys():
props = layout.operator("mesh.bolt_add", text="Change Bolt")
props.change = True
for prm in BoltParameters():
......
......@@ -249,7 +249,7 @@ def Extras_contex_menu(self, context):
obj = context.object
layout = self.layout
if obj == None:
if obj == None or obj.data is None:
return
if 'Gear' in obj.data.keys():
......
......@@ -54,7 +54,7 @@ def Geodesic_contex_menu(self, context):
obj = context.object
layout = self.layout
if 'GeodesicDome' in obj.data.keys():
if obj.data is not None and 'GeodesicDome' in obj.data.keys():
props = layout.operator("mesh.generate_geodesic_dome", text="Change Geodesic Dome")
props.change = True
for prm in third_domes_panel_271.GeodesicDomeParameters():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment