Fix an AttributeErro exceptionr on missing object context
Fix an AttributeErro exceptionr on missing object context

This happens when the properties panel is pinned to the material tab.

Patch by Ralf Hölzemer (aka cheleb), thanks!

Differential Revision: https://developer.blender.org/D1776

tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird