Page MenuHome

Material context menu error report
Closed, ResolvedPublic


System Information
windows7 64
ASUS ATI Radeon HD6870

Blender Version
Broken: (All)
Worked: (None)

Short description of error

Event Timeline

Vuk Gardašević (lijenstina) lowered the priority of this task from 90 to 50.Jun 7 2017, 11:47 PM

I can confirm the issue with empty slots on Win build 58a434b.
Pressing the pin button will cause the line

is_sortable = (len(ob.material_slots) > 1)

to crash as there is no material_slots attribute in the case if the pin is active on Blender Render.

Something like:

mat_slots = getattr(ob, "material_slots", None)
is_sortable = (len(mat_slots) > 1) if mat_slots else False

# or move the line bellow the check
if ob:
    is_sortable = (len(ob.material_slots) > 1)

could prevent the crash, as the restricted context will make the context.object be None.